diff options
author | Colin Watson <cjwatson@debian.org> | 2020-04-17 20:57:34 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2020-04-18 09:48:21 +0100 |
commit | df7226c4b684fd229dc046388225c69ded877721 (patch) | |
tree | e69014e1ee868c4ec178b8a36baae7de31786beb /fuzz/uniform_random.c | |
parent | f794345c2d734f593da8ed7754e5dbb5809c688d (diff) | |
parent | 75073d0a8478441cc97a6efa10b566c5fb1dac81 (diff) |
Update upstream source from tag 'upstream/1.4.0'
Update to upstream version '1.4.0'
with Debian dir 64889867df57bd13ea0cb964223697d378d391ce
Diffstat (limited to 'fuzz/uniform_random.c')
-rw-r--r-- | fuzz/uniform_random.c | 3 |
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 | ||
20 | uint32_t uniform_random(uint32_t); | 20 | uint32_t uniform_random(uint32_t); |
21 | unsigned 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 | } |