Don't use zero as null pointer constant (-Wzero-as-null-pointer-constant)

This commit is contained in:
practicalswift
2018-07-30 12:37:09 +02:00
committed by fanquake
parent f436bfd126
commit e53274868e
8 changed files with 10 additions and 10 deletions

View File

@@ -363,10 +363,10 @@ void RandAddStaticEnv(CSHA512& hasher)
#if HAVE_DECL_GETIFADDRS && HAVE_DECL_FREEIFADDRS
// Network interfaces
struct ifaddrs *ifad = NULL;
struct ifaddrs *ifad = nullptr;
getifaddrs(&ifad);
struct ifaddrs *ifit = ifad;
while (ifit != NULL) {
while (ifit != nullptr) {
hasher.Write((const unsigned char*)&ifit, sizeof(ifit));
hasher.Write((const unsigned char*)ifit->ifa_name, strlen(ifit->ifa_name) + 1);
hasher.Write((const unsigned char*)&ifit->ifa_flags, sizeof(ifit->ifa_flags));