about summary refs log tree commit diff
path: root/src/prng/rand_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/prng/rand_r.c')
-rw-r--r--src/prng/rand_r.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/prng/rand_r.c b/src/prng/rand_r.c
index e96cfba9..ef26dbde 100644
--- a/src/prng/rand_r.c
+++ b/src/prng/rand_r.c
@@ -2,5 +2,5 @@
 
 int rand_r(unsigned *seed)
 {
-	return (*seed = *seed * 1103515245 + 12345) & 0x7fffffff;
+	return (*seed = *seed * 1103515245 + 12345)/2;
 }