diff options
| author | deraadt <> | 2014-12-09 08:00:53 +0000 |
|---|---|---|
| committer | deraadt <> | 2014-12-09 08:00:53 +0000 |
| commit | edffaf4998902baa8112fbdd357ca8d9f34c7b30 (patch) | |
| tree | 35bd17a9ae6153fa77f794ca4b3d4cbf07e50e54 /src/lib/libc/stdlib/random.c | |
| parent | 5cd5e0377a60528d90a8552d4705f760c6e324ee (diff) | |
| download | openbsd-edffaf4998902baa8112fbdd357ca8d9f34c7b30.tar.gz openbsd-edffaf4998902baa8112fbdd357ca8d9f34c7b30.tar.bz2 openbsd-edffaf4998902baa8112fbdd357ca8d9f34c7b30.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 '')
| -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 | ||
