From 481572a99823142177f49c10bd3a828301b84db6 Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Thu, 21 Mar 2019 14:45:08 +0000 Subject: [PATCH] arc4random: Adjust example code to use uniform() API PR: 236678 Reported by: Andras Farkas --- lib/libc/gen/arc4random.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/arc4random.3 b/lib/libc/gen/arc4random.3 index 77ad24f9a570..a659a4c0baf4 100644 --- a/lib/libc/gen/arc4random.3 +++ b/lib/libc/gen/arc4random.3 @@ -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 ,