Skip to content

Commit 4dc1281

Browse files
committed
random: use int for MAX_TRIES
Removing the use of ssize_t, removes the need to include compat.h, just to make Windows happy.
1 parent fe1b325 commit 4dc1281

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/random.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ bool Random_SanityCheck()
634634
* GetOSRand() overwrites all 32 bytes of the output given a maximum
635635
* number of tries.
636636
*/
637-
static const ssize_t MAX_TRIES = 1024;
637+
static constexpr int MAX_TRIES{1024};
638638
uint8_t data[NUM_OS_RANDOM_BYTES];
639639
bool overwritten[NUM_OS_RANDOM_BYTES] = {}; /* Tracks which bytes have been overwritten at least once */
640640
int num_overwritten;

0 commit comments

Comments
 (0)