diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2014-12-09 00:02:19 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2014-12-09 00:02:19 +0000 |
commit | d4fbfb0d8780ad1597236e77f08a27b32babd929 (patch) | |
tree | b166fedfd4f01a20f6954cfafe5c9b54c7d51111 /lib/libc/stdlib | |
parent | 52956280e5d70eb7663f4aec796dfb0e1de24ee6 (diff) |
more standardsier: cast to int to make sure we keep the negative numbers.
observed by jonas termansen
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r-- | lib/libc/stdlib/mrand48.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdlib/mrand48.c b/lib/libc/stdlib/mrand48.c index 7bfccbbf837..0568a7ff93e 100644 --- a/lib/libc/stdlib/mrand48.c +++ b/lib/libc/stdlib/mrand48.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mrand48.c,v 1.4 2014/12/08 21:45:20 deraadt Exp $ */ +/* $OpenBSD: mrand48.c,v 1.5 2014/12/09 00:02:18 tedu Exp $ */ /* * Copyright (c) 1993 Martin Birgmeier * All rights reserved. @@ -20,7 +20,7 @@ long mrand48(void) { if (__rand48_deterministic == 0) - return arc4random(); + return (int)arc4random(); __dorand48(__rand48_seed); return ((long) __rand48_seed[2] << 16) + (long) __rand48_seed[1]; } |