|
From: | Joerg Wunsch |
Subject: | [avr-libc-commit] avr-libc ChangeLog NEWS libc/stdlib/rand.c libc... |
Date: | Mon, 08 Jan 2007 15:06:53 +0000 |
CVSROOT: /sources/avr-libc Module name: avr-libc Changes by: Joerg Wunsch <joerg_wunsch> 07/01/08 15:06:53 Modified files: . : ChangeLog NEWS libc/stdlib : rand.c random.c Log message: Fix broken seeding of the PRNGs when seeding with 0. This fix is courtesy Andrew Chernov from the FreeBSD project (rev. 1.21 of their random.c). * libc/stdlib/random.c (do_random): seed with another (arbitrary) value when attempting to seed with 0. * libc/stdlib/rand.c (do_rand): (Ditto.) Closes bug #18662: rand() keeps returning the same value if seeded with 0 CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/avr-libc/ChangeLog?cvsroot=avr-libc&r1=1.718&r2=1.719 http://cvs.savannah.gnu.org/viewcvs/avr-libc/NEWS?cvsroot=avr-libc&r1=1.175&r2=1.176 http://cvs.savannah.gnu.org/viewcvs/avr-libc/libc/stdlib/rand.c?cvsroot=avr-libc&r1=1.2&r2=1.3 http://cvs.savannah.gnu.org/viewcvs/avr-libc/libc/stdlib/random.c?cvsroot=avr-libc&r1=1.1&r2=1.2
[Prev in Thread] | Current Thread | [Next in Thread] |