diff options
author | ache <ache@FreeBSD.org> | 2003-02-03 10:22:12 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2003-02-03 10:22:12 +0000 |
commit | 2c36f3e337e908559979be58a51470c7336cab06 (patch) | |
tree | d0cfc71d1b2ec12652d4f2afb24ec1c659571650 /sys/libkern/random.c | |
parent | 35939fc6c18bf7f610fb321d5196e77794d86853 (diff) | |
download | FreeBSD-src-2c36f3e337e908559979be58a51470c7336cab06.zip FreeBSD-src-2c36f3e337e908559979be58a51470c7336cab06.tar.gz |
Park & Miller PRNG can be safely initialized with any value but 0 and stuck
at 0 as designed. Its BSD adaptation tries to fight it by mapping 0 to
2147483647 after calculation, but this method not works since 2147483647
seed returns to 0 again on the next interation. Instead of after calculation
mapping, map 0 to another value _before_ calculation, so it never stucks.
Diffstat (limited to 'sys/libkern/random.c')
0 files changed, 0 insertions, 0 deletions