diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/stdlib/lcong48.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/libc/stdlib/lcong48.c b/src/lib/libc/stdlib/lcong48.c index 2cf5c271ba..09726efb6e 100644 --- a/src/lib/libc/stdlib/lcong48.c +++ b/src/lib/libc/stdlib/lcong48.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: lcong48.c,v 1.3 2005/08/08 08:05:36 espie Exp $ */ | 1 | /* $OpenBSD: lcong48.c,v 1.4 2014/12/08 21:45:20 deraadt Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 1993 Martin Birgmeier | 3 | * Copyright (c) 1993 Martin Birgmeier |
| 4 | * All rights reserved. | 4 | * All rights reserved. |
| @@ -21,6 +21,14 @@ extern unsigned short __rand48_add; | |||
| 21 | void | 21 | void |
| 22 | lcong48(unsigned short p[7]) | 22 | lcong48(unsigned short p[7]) |
| 23 | { | 23 | { |
| 24 | lcong48_deterministic(p); | ||
| 25 | __rand48_deterministic = 0; | ||
| 26 | } | ||
| 27 | |||
| 28 | void | ||
| 29 | lcong48_deterministic(unsigned short p[7]) | ||
| 30 | { | ||
| 31 | __rand48_deterministic = 1; | ||
| 24 | __rand48_seed[0] = p[0]; | 32 | __rand48_seed[0] = p[0]; |
| 25 | __rand48_seed[1] = p[1]; | 33 | __rand48_seed[1] = p[1]; |
| 26 | __rand48_seed[2] = p[2]; | 34 | __rand48_seed[2] = p[2]; |
