diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2008-03-02 21:29:08 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2008-03-02 21:29:08 +0000 |
commit | df974a94d10240b2159aa0ae4842955efd9252c6 (patch) | |
tree | d0fef5d93ab5796bad8487ebb0dd043e731d25fa /distrib/special/disknames | |
parent | 54b368c4e9f5d7310129b5079d26619a2b48b14c (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/special/disknames')
0 files changed, 0 insertions, 0 deletions