summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/rand.c
diff options
context:
space:
mode:
authorderaadt <>2014-12-09 08:00:53 +0000
committerderaadt <>2014-12-09 08:00:53 +0000
commit4c5fdbeac15beb0f782595a1add602427ab55614 (patch)
tree35bd17a9ae6153fa77f794ca4b3d4cbf07e50e54 /src/lib/libc/stdlib/rand.c
parentdfd1c0c1d9d7c41d421ed649d2a4460b86132cb3 (diff)
downloadopenbsd-4c5fdbeac15beb0f782595a1add602427ab55614.tar.gz
openbsd-4c5fdbeac15beb0f782595a1add602427ab55614.tar.bz2
openbsd-4c5fdbeac15beb0f782595a1add602427ab55614.zip
improve warnings from rand_r(), rand(), and random()libressl-v2.1.2
It may take a few iterations to get the tone right. previously discussed with millert
Diffstat (limited to 'src/lib/libc/stdlib/rand.c')
-rw-r--r--src/lib/libc/stdlib/rand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libc/stdlib/rand.c b/src/lib/libc/stdlib/rand.c
index 00390a23e7..ee2fd44bac 100644
--- a/src/lib/libc/stdlib/rand.c
+++ b/src/lib/libc/stdlib/rand.c
@@ -42,7 +42,7 @@ rand_r(u_int *seed)
42 42
43#if defined(APIWARN) 43#if defined(APIWARN)
44__warn_references(rand_r, 44__warn_references(rand_r,
45 "warning: rand_r() isn't random; consider using arc4random()"); 45 "warning: rand_r() is not random, it is deterministic.");
46#endif 46#endif
47 47
48int 48int
@@ -55,7 +55,7 @@ rand(void)
55 55
56#if defined(APIWARN) 56#if defined(APIWARN)
57__warn_references(rand, 57__warn_references(rand,
58 "warning: rand() isn't random; consider using arc4random()"); 58 "warning: rand() may return determinstic values, is that what you want?");
59#endif 59#endif
60 60
61void 61void