summaryrefslogtreecommitdiff
path: root/distrib/sets
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2008-03-02 21:29:08 +0000
committerDamien Miller <djm@cvs.openbsd.org>2008-03-02 21:29:08 +0000
commitdf974a94d10240b2159aa0ae4842955efd9252c6 (patch)
treed0fef5d93ab5796bad8487ebb0dd043e731d25fa /distrib/sets
parent54b368c4e9f5d7310129b5079d26619a2b48b14c (diff)
Add a arc4random_uniform() that returns a uniformly distributed number
in the range 0 <= x < upper_bound Please use this new API instead of "arc4random() % upper_bound", as it avoids the "modulo bias" that favours small results when upper_bound is not a power of two. feedback deraadt@ mcbride@; ok deraadt@
Diffstat (limited to 'distrib/sets')
0 files changed, 0 insertions, 0 deletions