diff options
author | 2014-12-09 08:00:53 +0000 | |
---|---|---|
committer | 2014-12-09 08:00:53 +0000 | |
commit | de928067c545be6ee26565846177ce57fabae769 (patch) | |
tree | c14d9f61c4e0347e1564cbbead8cc81c3fecf9f5 /lib/libc/stdlib/rand.c | |
parent | In ingo's new world order, we do not want multiple manual pages describing (diff) | |
download | wireguard-openbsd-de928067c545be6ee26565846177ce57fabae769.tar.xz wireguard-openbsd-de928067c545be6ee26565846177ce57fabae769.zip |
improve warnings from rand_r(), rand(), and random()
It may take a few iterations to get the tone right.
previously discussed with millert
Diffstat (limited to 'lib/libc/stdlib/rand.c')
-rw-r--r-- | lib/libc/stdlib/rand.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdlib/rand.c b/lib/libc/stdlib/rand.c index 00390a23e78..ee2fd44bac6 100644 --- a/lib/libc/stdlib/rand.c +++ b/lib/libc/stdlib/rand.c @@ -42,7 +42,7 @@ rand_r(u_int *seed) #if defined(APIWARN) __warn_references(rand_r, - "warning: rand_r() isn't random; consider using arc4random()"); + "warning: rand_r() is not random, it is deterministic."); #endif int @@ -55,7 +55,7 @@ rand(void) #if defined(APIWARN) __warn_references(rand, - "warning: rand() isn't random; consider using arc4random()"); + "warning: rand() may return determinstic values, is that what you want?"); #endif void |