projects
/
platform
/
upstream
/
syslinux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
911a37f
)
Fix lrand48() and rand()
author
H. Peter Anvin
<hpa@zytor.com>
Mon, 11 Aug 2008 16:14:40 +0000
(09:14 -0700)
committer
H. Peter Anvin
<hpa@zytor.com>
Mon, 11 Aug 2008 16:14:40 +0000
(09:14 -0700)
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>
com32/lib/lrand48.c
patch
|
blob
|
history
diff --git
a/com32/lib/lrand48.c
b/com32/lib/lrand48.c
index
f26d099
..
03ad377
100644
(file)
--- 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
);
}