Browse Source

Oops, got the sense of the test backwards. Hilarious that we didn't spot it.

OPENBSD_5_7
deraadt 10 years ago
parent
commit
c0b4a826d3
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/lib/libc/stdlib/rand.c

+ 1
- 1
src/lib/libc/stdlib/rand.c View File

@ -48,7 +48,7 @@ __warn_references(rand_r,
int int
rand(void) rand(void)
{ {
if (rand_deterministic)
if (rand_deterministic == 0)
return (arc4random() % ((u_int)RAND_MAX + 1)); return (arc4random() % ((u_int)RAND_MAX + 1));
return (rand_r(&next)); return (rand_r(&next));
} }


Loading…
Cancel
Save