public
/
ack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5512f14
)
rand() did not work on 2-byte machines
author
ceriel
<none@none>
Sat, 30 Jun 1990 20:02:45 +0000
(20:02 +0000)
committer
ceriel
<none@none>
Sat, 30 Jun 1990 20:02:45 +0000
(20:02 +0000)
lang/cem/libcc.ansi/stdlib/rand.c
patch
|
blob
|
history
diff --git
a/lang/cem/libcc.ansi/stdlib/rand.c
b/lang/cem/libcc.ansi/stdlib/rand.c
index
dbae2b1
..
82afb2e
100644
(file)
--- a/
lang/cem/libcc.ansi/stdlib/rand.c
+++ b/
lang/cem/libcc.ansi/stdlib/rand.c
@@
-11,7
+11,7
@@
static unsigned long int next = 1;
int rand(void)
{
next = next * 1103515245 + 12345;
- return (unsigned int)(next/(2 * (RAND_MAX +1
)) % (RAND_MAX+1
));
+ return (unsigned int)(next/(2 * (RAND_MAX +1
L)) % (RAND_MAX+1L
));
}
void srand(unsigned int seed)