diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-08-11 09:14:40 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-08-11 09:14:40 -0700 |
commit | 7552258bacc4ef63f7ad40baf26162a1bcf81f78 (patch) | |
tree | 46bbba0cb39e8be372594d066f7ae80115f06a6a | |
parent | 911a37f89e07e191f39e21603ca4b6f4674f63ae (diff) | |
download | syslinux-7552258bacc4ef63f7ad40baf26162a1bcf81f78.tar.gz |
Fix lrand48() and rand()
lrand48() and rand() had improper parenthesization, which caused it to
return negative values.
Spotted by Stefan Bucur :)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | com32/lib/lrand48.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/lib/lrand48.c b/com32/lib/lrand48.c index f26d0996..03ad3771 100644 --- a/com32/lib/lrand48.c +++ b/com32/lib/lrand48.c @@ -37,5 +37,5 @@ long nrand48(unsigned short xsubi[3]) long lrand48(void) { - return (long)((uint32_t)(mrand48() >> 1)); + return (long)((uint32_t)mrand48() >> 1); } |