diff options
author | Ron Yorston <rmy@pobox.com> | 2023-01-06 15:51:30 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-01-06 15:51:30 +0000 |
commit | 6a61981e0480b8a469d9d4b84ea27a9ec1d2b8d9 (patch) | |
tree | 76e2f4c2070676618e2ff8d5d143301d47ad21e8 /init | |
parent | 1eb579690c66bd3ca893aefaa77d17be7dda78b5 (diff) | |
download | busybox-w32-6a61981e0480b8a469d9d4b84ea27a9ec1d2b8d9.tar.gz busybox-w32-6a61981e0480b8a469d9d4b84ea27a9ec1d2b8d9.tar.bz2 busybox-w32-6a61981e0480b8a469d9d4b84ea27a9ec1d2b8d9.zip |
awk: make random values more random
When srand(3) is called to seed the random number generator with
the current time the first value returned by rand(3) changes slowly
with time. This is a property of the implementation in the C runtime.
Change the order in which values from rand(3) are consumed to generate
the value returned by the awk rand() function. This puts the value
returned by the first call to rand(3) in the least significant bits,
not the most significant.
(GitHub issue #279)
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions