diff --git a/src/random.cpp b/src/random.cpp index 5f50c001cd..432592589a 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -8,23 +8,22 @@ #include #include #include -#include -#ifdef WIN32 -#include -#include -#endif #include #include -#include #include -#include // for Mutex -#include // for GetTimeMicros() +#include +#include +#include +#include #include #include #include -#ifndef WIN32 +#ifdef WIN32 +#include +#include +#else #include #include #endif @@ -634,7 +633,7 @@ bool Random_SanityCheck() * GetOSRand() overwrites all 32 bytes of the output given a maximum * number of tries. */ - static const ssize_t MAX_TRIES = 1024; + static constexpr int MAX_TRIES{1024}; uint8_t data[NUM_OS_RANDOM_BYTES]; bool overwritten[NUM_OS_RANDOM_BYTES] = {}; /* Tracks which bytes have been overwritten at least once */ int num_overwritten;