diff options
| author | cgd <cgd@NetBSD.org> | 1994-10-19 03:06:51 +0000 |
|---|---|---|
| committer | cgd <cgd@NetBSD.org> | 1994-10-19 03:06:51 +0000 |
| commit | ce7850d53d1b1e6ea97dbf714347c8ad137ca0f5 (patch) | |
| tree | d079759ca3c496e66f77a11b9fa80ebf41032c45 /lib/libc/stdlib | |
| parent | 5eca8fd521d0a819040d5651c1827d8f35ec47a8 (diff) | |
cast type
Diffstat (limited to 'lib/libc/stdlib')
| -rw-r--r-- | lib/libc/stdlib/rand.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdlib/rand.c b/lib/libc/stdlib/rand.c index 5ad697c0ad6..5834496062c 100644 --- a/lib/libc/stdlib/rand.c +++ b/lib/libc/stdlib/rand.c @@ -33,7 +33,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)rand.c 5.6 (Berkeley) 6/24/91";*/ -static char *rcsid = "$Id: rand.c,v 1.3 1993/08/26 00:48:09 jtc Exp $"; +static char *rcsid = "$Id: rand.c,v 1.4 1994/10/19 03:06:51 cgd Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -44,7 +44,7 @@ static u_long next = 1; int rand() { - return ((next = next * 1103515245 + 12345) % (RAND_MAX + 1)); + return ((next = next * 1103515245 + 12345) % ((u_int)RAND_MAX + 1)); } void |
