From 4dc12816ace11eceee05c1ad24dd925f420a0bda Mon Sep 17 00:00:00 2001 From: fanquake Date: Fri, 30 Dec 2022 12:08:17 +0000 Subject: [PATCH] random: use int for MAX_TRIES Removing the use of ssize_t, removes the need to include compat.h, just to make Windows happy. --- src/random.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/random.cpp b/src/random.cpp index 5f50c001cd02c..c45cf515266bb 100644 --- a/src/random.cpp +++ b/src/random.cpp @@ -634,7 +634,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;