diff options
author | deraadt <> | 2014-12-09 08:00:53 +0000 |
---|---|---|
committer | deraadt <> | 2014-12-09 08:00:53 +0000 |
commit | 4c5fdbeac15beb0f782595a1add602427ab55614 (patch) | |
tree | 35bd17a9ae6153fa77f794ca4b3d4cbf07e50e54 /src/lib/libc/stdlib/random.c | |
parent | dfd1c0c1d9d7c41d421ed649d2a4460b86132cb3 (diff) | |
download | openbsd-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/random.c')
-rw-r--r-- | src/lib/libc/stdlib/random.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/libc/stdlib/random.c b/src/lib/libc/stdlib/random.c index cba088c751..375bfbd0e6 100644 --- a/src/lib/libc/stdlib/random.c +++ b/src/lib/libc/stdlib/random.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: random.c,v 1.25 2014/12/08 21:45:20 deraadt Exp $ */ | 1 | /* $OpenBSD: random.c,v 1.26 2014/12/09 08:00:53 deraadt Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1983 Regents of the University of California. | 3 | * Copyright (c) 1983 Regents of the University of California. |
4 | * All rights reserved. | 4 | * All rights reserved. |
@@ -415,3 +415,8 @@ random(void) | |||
415 | UNLOCK(); | 415 | UNLOCK(); |
416 | return r; | 416 | return r; |
417 | } | 417 | } |
418 | |||
419 | #if defined(APIWARN) | ||
420 | __warn_references(rand, | ||
421 | "warning: random() may return determinstic values, is that what you want?"); | ||
422 | #endif | ||