diff options
author | deraadt <> | 2014-12-08 21:52:06 +0000 |
---|---|---|
committer | deraadt <> | 2014-12-08 21:52:06 +0000 |
commit | 430732678b2b335f9570495746738b681bd3f450 (patch) | |
tree | 31daef7e7e67528d392b6a68effdd2e0509d1282 /src/lib/libc/stdlib/rand.c | |
parent | 9736a7f2a9e739ee9fc431040def5680fbb8794a (diff) | |
download | openbsd-430732678b2b335f9570495746738b681bd3f450.tar.gz openbsd-430732678b2b335f9570495746738b681bd3f450.tar.bz2 openbsd-430732678b2b335f9570495746738b681bd3f450.zip |
Oops, got the sense of the test backwards. Hilarious that we didn't spot it.
Diffstat (limited to 'src/lib/libc/stdlib/rand.c')
-rw-r--r-- | src/lib/libc/stdlib/rand.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/libc/stdlib/rand.c b/src/lib/libc/stdlib/rand.c index 618559fd9c..00390a23e7 100644 --- a/src/lib/libc/stdlib/rand.c +++ b/src/lib/libc/stdlib/rand.c | |||
@@ -48,7 +48,7 @@ __warn_references(rand_r, | |||
48 | int | 48 | int |
49 | rand(void) | 49 | rand(void) |
50 | { | 50 | { |
51 | if (rand_deterministic) | 51 | if (rand_deterministic == 0) |
52 | return (arc4random() % ((u_int)RAND_MAX + 1)); | 52 | return (arc4random() % ((u_int)RAND_MAX + 1)); |
53 | return (rand_r(&next)); | 53 | return (rand_r(&next)); |
54 | } | 54 | } |