mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
random: use int for MAX_TRIES
Removing the use of ssize_t, removes the need to include compat.h, just to make Windows happy.
This commit is contained in:
@@ -634,7 +634,7 @@ bool Random_SanityCheck()
|
|||||||
* GetOSRand() overwrites all 32 bytes of the output given a maximum
|
* GetOSRand() overwrites all 32 bytes of the output given a maximum
|
||||||
* number of tries.
|
* number of tries.
|
||||||
*/
|
*/
|
||||||
static const ssize_t MAX_TRIES = 1024;
|
static constexpr int MAX_TRIES{1024};
|
||||||
uint8_t data[NUM_OS_RANDOM_BYTES];
|
uint8_t data[NUM_OS_RANDOM_BYTES];
|
||||||
bool overwritten[NUM_OS_RANDOM_BYTES] = {}; /* Tracks which bytes have been overwritten at least once */
|
bool overwritten[NUM_OS_RANDOM_BYTES] = {}; /* Tracks which bytes have been overwritten at least once */
|
||||||
int num_overwritten;
|
int num_overwritten;
|
||||||
|
|||||||
Reference in New Issue
Block a user