summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-08-11 09:14:40 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-08-11 09:14:40 -0700
commit7552258bacc4ef63f7ad40baf26162a1bcf81f78 (patch)
tree46bbba0cb39e8be372594d066f7ae80115f06a6a
parent911a37f89e07e191f39e21603ca4b6f4674f63ae (diff)
downloadsyslinux-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.c2
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);
}