diff options
Diffstat (limited to 'src/random.cpp')
-rw-r--r-- | src/random.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/random.cpp b/src/random.cpp index b004bfa91e..7e0e94439e 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -46,10 +46,10 @@ #include <openssl/err.h> #include <openssl/rand.h> -static void RandFailure() +[[noreturn]] static void RandFailure() { LogPrintf("Failed to read randomness, aborting\n"); - abort(); + std::abort(); } static inline int64_t GetPerformanceCounter() @@ -242,7 +242,7 @@ void GetOSRand(unsigned char *ent32) } #elif defined(HAVE_GETENTROPY_RAND) && defined(MAC_OSX) // We need a fallback for OSX < 10.12 - if (&getentropy != NULL) { + if (&getentropy != nullptr) { if (getentropy(ent32, NUM_OS_RANDOM_BYTES) != 0) { RandFailure(); } |