Date: Thu, 21 Mar 2019 14:45:08 +0000 (UTC) From: Conrad Meyer <cem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r345380 - head/lib/libc/gen Message-ID: <201903211445.x2LEj8U0002125@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cem Date: Thu Mar 21 14:45:08 2019 New Revision: 345380 URL: https://svnweb.freebsd.org/changeset/base/345380 Log: arc4random: Adjust example code to use uniform() API PR: 236678 Reported by: Andras Farkas <deepbluemistake AT gmail.com> Modified: head/lib/libc/gen/arc4random.3 Modified: head/lib/libc/gen/arc4random.3 ============================================================================== --- head/lib/libc/gen/arc4random.3 Thu Mar 21 14:17:55 2019 (r345379) +++ head/lib/libc/gen/arc4random.3 Thu Mar 21 14:45:08 2019 (r345380) @@ -31,7 +31,7 @@ .\" Manual page, using -mandoc macros .\" $FreeBSD$ .\" -.Dd July 19, 2014 +.Dd March 21, 2019 .Dt ARC4RANDOM 3 .Os .Sh NAME @@ -116,7 +116,7 @@ and functions using .Fn arc4random : .Pp -.Dl "#define foo4random() (arc4random() % ((unsigned)RAND_MAX + 1))" +.Dl "#define foo4random() (arc4random_uniform(RAND_MAX + 1))" .Sh SEE ALSO .Xr rand 3 , .Xr rand48 3 ,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903211445.x2LEj8U0002125>