diff options
Diffstat (limited to 'lib/libc/stdlib/rand.c')
-rw-r--r-- | lib/libc/stdlib/rand.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/stdlib/rand.c b/lib/libc/stdlib/rand.c index f96af30056057..3879281d2581b 100644 --- a/lib/libc/stdlib/rand.c +++ b/lib/libc/stdlib/rand.c @@ -43,7 +43,7 @@ static u_long next = 1; int rand() { - return ((next = next * 1103515245 + 12345) % (RAND_MAX + 1)); + return ((next = next * 1103515245 + 12345) % ((u_long)RAND_MAX + 1)); } void |