mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Don't use zero as null pointer constant (-Wzero-as-null-pointer-constant)
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user