summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormillert <>1998-12-07 16:44:41 +0000
committermillert <>1998-12-07 16:44:41 +0000
commit56a9035075f410cfb2c8bb20110d758081756705 (patch)
tree972ee18c661bcf52ec4b6444829383df2e49e364 /src
parent581f68e60702489a5a693690a9183fac12ee96ef (diff)
downloadopenbsd-56a9035075f410cfb2c8bb20110d758081756705.tar.gz
openbsd-56a9035075f410cfb2c8bb20110d758081756705.tar.bz2
openbsd-56a9035075f410cfb2c8bb20110d758081756705.zip
remove bogus divide, fixes pr #656
Diffstat (limited to 'src')
-rw-r--r--src/lib/libc/stdlib/rand.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libc/stdlib/rand.c b/src/lib/libc/stdlib/rand.c
index 797d3b2848..838c98a9fd 100644
--- a/src/lib/libc/stdlib/rand.c
+++ b/src/lib/libc/stdlib/rand.c
@@ -32,7 +32,7 @@
32 */ 32 */
33 33
34#if defined(LIBC_SCCS) && !defined(lint) 34#if defined(LIBC_SCCS) && !defined(lint)
35static char *rcsid = "$OpenBSD: rand.c,v 1.4 1998/11/22 07:41:04 deraadt Exp $"; 35static char *rcsid = "$OpenBSD: rand.c,v 1.5 1998/12/07 16:44:41 millert Exp $";
36#endif /* LIBC_SCCS and not lint */ 36#endif /* LIBC_SCCS and not lint */
37 37
38#include <sys/types.h> 38#include <sys/types.h>
@@ -45,7 +45,7 @@ rand_r(seed)
45u_int *seed; 45u_int *seed;
46{ 46{
47 *seed = *seed * 1103515245 + 12345; 47 *seed = *seed * 1103515245 + 12345;
48 return (u_int)(*seed / 65536) % ((u_int)RAND_MAX + 1); 48 return (u_int)(*seed) % ((u_int)RAND_MAX + 1);
49} 49}
50 50
51int 51int