summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEitan Adler <eadler@FreeBSD.org>2012-10-12 02:12:53 +0000
committerEitan Adler <eadler@FreeBSD.org>2012-10-12 02:12:53 +0000
commitcd4197d01a2a6be4297936686f4dbd9c4bee0cb8 (patch)
treea7332e31482ff130670caccef021ad88aeb34749
parent40e61da9f97dfa38fc3b21dbf03bba169abd7d7d (diff)
Notes
-rw-r--r--lib/libc/stdlib/rand.c3
-rw-r--r--lib/libc/stdlib/random.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/libc/stdlib/rand.c b/lib/libc/stdlib/rand.c
index 077c1ba4ad19f..fa376d9265e08 100644
--- a/lib/libc/stdlib/rand.c
+++ b/lib/libc/stdlib/rand.c
@@ -130,10 +130,9 @@ sranddev()
if (!done) {
struct timeval tv;
- unsigned long junk;
gettimeofday(&tv, NULL);
- srand((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ junk);
+ srand((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec);
}
}
diff --git a/lib/libc/stdlib/random.c b/lib/libc/stdlib/random.c
index baae078e11e20..749c0d73407a9 100644
--- a/lib/libc/stdlib/random.c
+++ b/lib/libc/stdlib/random.c
@@ -315,10 +315,9 @@ srandomdev()
if (!done) {
struct timeval tv;
- volatile unsigned long junk;
gettimeofday(&tv, NULL);
- srandom((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec ^ junk);
+ srandom((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec);
return;
}