summaryrefslogtreecommitdiff
path: root/fuzz/uniform_random.c
diff options
context:
space:
mode:
Diffstat (limited to 'fuzz/uniform_random.c')
-rw-r--r--fuzz/uniform_random.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fuzz/uniform_random.c b/fuzz/uniform_random.c
index 7711d69..357091c 100644
--- a/fuzz/uniform_random.c
+++ b/fuzz/uniform_random.c
@@ -18,6 +18,7 @@
18#include <stdlib.h> 18#include <stdlib.h>
19 19
20uint32_t uniform_random(uint32_t); 20uint32_t uniform_random(uint32_t);
21unsigned long prng_uint32(void);
21 22
22/* 23/*
23 * Calculate a uniformly distributed random number less than upper_bound 24 * Calculate a uniformly distributed random number less than upper_bound
@@ -47,7 +48,7 @@ uniform_random(uint32_t upper_bound)
47 * to re-roll. 48 * to re-roll.
48 */ 49 */
49 for (;;) { 50 for (;;) {
50 r = (uint32_t)random(); 51 r = (uint32_t)prng_uint32();
51 if (r >= min) 52 if (r >= min)
52 break; 53 break;
53 } 54 }