Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Mar 2019 02:22:17 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 236678] arc4random man page example could be better
Message-ID:  <bug-236678-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D236678

            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@FreeBSD.org
          Reporter: deepbluemistake@gmail.com
                CC: doc@FreeBSD.org

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

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-236678-227>