[Bug 236678] arc4random man page example could be better

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Mar 21 02:22:20 UTC 2019


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236678

            Bug ID: 236678
           Summary: arc4random man page example could be better
           Product: Documentation
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Manual Pages
          Assignee: bugs at FreeBSD.org
          Reporter: deepbluemistake at gmail.com
                CC: doc at FreeBSD.org

https://www.freebsd.org/cgi/man.cgi?query=arc4random
The example:
#define foo4random()    (arc4random() % ((unsigned)RAND_MAX + 1))
would be better as:
#define foo4random()    (arc4random_uniform((unsigned)RAND_MAX))

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the freebsd-doc mailing list