]> sourceware.org Git - glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Thu, 28 Oct 1999 21:10:55 +0000 (21:10 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 28 Oct 1999 21:10:55 +0000 (21:10 +0000)
1999-10-27  Andreas Jaeger  <aj@suse.de>

* stdlib/rand_r.c (rand_r): Really use 31 bits, the result was
shifted a bit too much.
Reported by Eugen Dedu <dedu@ese-metz.fr>.

ChangeLog
stdlib/rand_r.c

index 44f685b971f055d4c29e24aa4392919ac3a17ced..5baadb5f8339e815edfd75935d99cb1be8a036a2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+1999-10-27  Andreas Jaeger  <aj@suse.de>
+
+       * stdlib/rand_r.c (rand_r): Really use 31 bits, the result was
+       shifted a bit too much.
+       Reported by Eugen Dedu <dedu@ese-metz.fr>.
+
 1999-10-25  Ulrich Drepper  <drepper@cygnus.com>
 
        * resolv/gethnamaddr.c: Account bytes needed for alignment in
index 3e0b8b2bc0f242b6c14072585e469c40d387a165..00c619a830ad0120d686bfa4f52afcbbfef0a91c 100644 (file)
@@ -1,5 +1,5 @@
 /* Reentrant random function frm POSIX.1c.
-   Copyright (C) 1996 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1999 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
 
@@ -35,7 +35,7 @@ rand_r (unsigned int *seed)
 
   next *= 1103515245;
   next += 12345;
-  result <<= 11;
+  result <<= 10;
   result ^= (unsigned int) (next / 65536) % 1024;
 
   next *= 1103515245;
This page took 0.054229 seconds and 5 git commands to generate.