summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/rand.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2003-02-05 21:25:50 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2003-02-05 21:25:50 +0000
commitf3047249d4caf0e02dce97c8bc0f0ce2eda7ee78 (patch)
tree300dad92ec2c504fd0e41939d1a26b9a9b729eab /lib/libc/stdlib/rand.c
parent028a849180f9fdff2387f069b2673c4c12257c78 (diff)
Notes
Diffstat (limited to 'lib/libc/stdlib/rand.c')
-rw-r--r--lib/libc/stdlib/rand.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/stdlib/rand.c b/lib/libc/stdlib/rand.c
index dcc445f13ebd..779121835099 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();
}