summaryrefslogtreecommitdiff
path: root/sys/libkern/random.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2003-02-04 11:33:09 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2003-02-04 11:33:09 +0000
commita36d6a59f034c8f9f9c394dbea4760c459308b7b (patch)
tree961100e9eb2b8dff7b14ae8d86dbbe604151f7f2 /sys/libkern/random.c
parentddd972a9bd5f8a73cd9eb33181072d07ea99aa73 (diff)
Notes
Diffstat (limited to 'sys/libkern/random.c')
-rw-r--r--sys/libkern/random.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/libkern/random.c b/sys/libkern/random.c
index 1145a844f03f..e390cde8fc33 100644
--- a/sys/libkern/random.c
+++ b/sys/libkern/random.c
@@ -36,13 +36,19 @@
#include <sys/libkern.h>
+#define NSHUFF 100 /* to drop part of seed -> 1st value correlation */
+
static u_long randseed = 1;
void
srandom(seed)
u_long seed;
{
+ int i;
+
randseed = seed;
+ for (i = 0; i < NSHUFF; i++)
+ (void)random();
}
/*