Skip to content

Commit

Permalink
random: use int for MAX_TRIES
Browse files Browse the repository at this point in the history
Removing the use of ssize_t, removes the need to include compat.h, just 
to make Windows happy.
  • Loading branch information
fanquake committed Feb 17, 2023
1 parent fe1b325 commit 4dc1281
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/random.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4dc1281

Please sign in to comment.