diff options
author | ache <ache@FreeBSD.org> | 2003-02-05 21:25:50 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2003-02-05 21:25:50 +0000 |
commit | 601bb3d3753959d6074c7dbdc1c5838e35dd4faf (patch) | |
tree | 300dad92ec2c504fd0e41939d1a26b9a9b729eab /lib/libc/stdlib | |
parent | 1be933f3291a1b440b0abcef21625ac310a3bcad (diff) | |
download | FreeBSD-src-601bb3d3753959d6074c7dbdc1c5838e35dd4faf.zip FreeBSD-src-601bb3d3753959d6074c7dbdc1c5838e35dd4faf.tar.gz |
Since we drop NSHUFF values now, set default seed to what it becomes
after srand(1)
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r-- | lib/libc/stdlib/rand.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/stdlib/rand.c b/lib/libc/stdlib/rand.c index dcc445f..7791218 100644 --- a/lib/libc/stdlib/rand.c +++ b/lib/libc/stdlib/rand.c @@ -98,12 +98,12 @@ rand_r(unsigned int *ctx) } -static u_long next = 1; +static u_long next = 892053144; /* after srand(1), NSHUFF counted */ int rand() { - return do_rand(&next); + return (do_rand(&next)); } void @@ -114,7 +114,7 @@ u_int seed; next = seed; for (i = 0; i < NSHUFF; i++) - (void)do_rand(&next); + (void)rand(); } |