summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/rand.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2003-02-17 03:52:35 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2003-02-17 03:52:35 +0000
commit49abb2a4f8eaa957bcbcd1966ba2cc0ba09c0662 (patch)
tree00af365d9446378d7e5847aa6f4d8a8eee4791d1 /lib/libc/stdlib/rand.c
parentdecb00f6770a1e059fa7f9ee83cc6b103c48cf54 (diff)
Notes
Diffstat (limited to 'lib/libc/stdlib/rand.c')
-rw-r--r--lib/libc/stdlib/rand.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/libc/stdlib/rand.c b/lib/libc/stdlib/rand.c
index 779121835099..c412133d9363 100644
--- a/lib/libc/stdlib/rand.c
+++ b/lib/libc/stdlib/rand.c
@@ -51,8 +51,6 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#endif /* TEST */
-#define NSHUFF 100 /* to drop part of seed -> 1st value correlation */
-
static int
do_rand(unsigned long *ctx)
{
@@ -98,7 +96,7 @@ rand_r(unsigned int *ctx)
}
-static u_long next = 892053144; /* after srand(1), NSHUFF counted */
+static u_long next = 1;
int
rand()
@@ -110,11 +108,7 @@ void
srand(seed)
u_int seed;
{
- int i;
-
next = seed;
- for (i = 0; i < NSHUFF; i++)
- (void)rand();
}