diff options
author | 2014-12-08 21:52:06 +0000 | |
---|---|---|
committer | 2014-12-08 21:52:06 +0000 | |
commit | 5a944dae1147a279a12a9a1fe91470d3aa751950 (patch) | |
tree | a726fb7238445b1d46bc5b6fa5be419e39242740 /lib/libc/stdlib/rand.c | |
parent | Use srandom_deterministic() if a seed is supplied, thereby switching the (diff) | |
download | wireguard-openbsd-5a944dae1147a279a12a9a1fe91470d3aa751950.tar.xz wireguard-openbsd-5a944dae1147a279a12a9a1fe91470d3aa751950.zip |
Oops, got the sense of the test backwards. Hilarious that we didn't spot it.
Diffstat (limited to 'lib/libc/stdlib/rand.c')
-rw-r--r-- | lib/libc/stdlib/rand.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/stdlib/rand.c b/lib/libc/stdlib/rand.c index 618559fd9ce..00390a23e78 100644 --- a/lib/libc/stdlib/rand.c +++ b/lib/libc/stdlib/rand.c @@ -48,7 +48,7 @@ __warn_references(rand_r, int rand(void) { - if (rand_deterministic) + if (rand_deterministic == 0) return (arc4random() % ((u_int)RAND_MAX + 1)); return (rand_r(&next)); } |