]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC: r300956
authorache <ache@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 5 Jun 2016 14:31:36 +0000 (14:31 +0000)
committerache <ache@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 5 Jun 2016 14:31:36 +0000 (14:31 +0000)
commitcd3b8f4af3df5a5b7f9816e9a2423cd961881649
tree61968c856608ab8e301e746f247a45e07f4262fc
parent4857a941df22964432dad90a95566315097cdc06
MFC: r300956

1) Unifdef USE_WEAK_SEEDING since it is too obsolete to support and makes
reading hard.

2) Instead of doing range transformation in each and every function here,
do it single time directly in do_rand(). One "mod" operation overhead is not
a big deal, but the code looks nicer and possible future functions additions
or PRNG change do not miss range transformations neither have unneeded ones.

3) Use POSIX argument types for visible functions (cosmetic).

git-svn-id: svn://svn.freebsd.org/base/stable/10@301445 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/libc/stdlib/rand.c