From 151b095049443922c0f7334b56b5a2dce1d133c6 Mon Sep 17 00:00:00 2001 From: millert <> Date: Mon, 7 Dec 1998 16:44:41 +0000 Subject: [PATCH] remove bogus divide, fixes pr #656 --- src/lib/libc/stdlib/rand.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/libc/stdlib/rand.c b/src/lib/libc/stdlib/rand.c index 797d3b28..838c98a9 100644 --- a/src/lib/libc/stdlib/rand.c +++ b/src/lib/libc/stdlib/rand.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: rand.c,v 1.4 1998/11/22 07:41:04 deraadt Exp $"; +static char *rcsid = "$OpenBSD: rand.c,v 1.5 1998/12/07 16:44:41 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -45,7 +45,7 @@ rand_r(seed) u_int *seed; { *seed = *seed * 1103515245 + 12345; - return (u_int)(*seed / 65536) % ((u_int)RAND_MAX + 1); + return (u_int)(*seed) % ((u_int)RAND_MAX + 1); } int