summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/res_random.c
diff options
context:
space:
mode:
authortholo <>1997-04-30 05:57:05 +0000
committertholo <>1997-04-30 05:57:05 +0000
commit338dd5e3bd9186a615bf2c0e20ef71f54d963318 (patch)
tree2c4da3faa35998f7804562a16df674b6b3f82af8 /src/lib/libc/net/res_random.c
parent37e5d720409522b387b468b7718497edd2b859a9 (diff)
downloadopenbsd-338dd5e3bd9186a615bf2c0e20ef71f54d963318.tar.gz
openbsd-338dd5e3bd9186a615bf2c0e20ef71f54d963318.tar.bz2
openbsd-338dd5e3bd9186a615bf2c0e20ef71f54d963318.zip
Be more careful about possible type promotion
Diffstat (limited to 'src/lib/libc/net/res_random.c')
-rw-r--r--src/lib/libc/net/res_random.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/libc/net/res_random.c b/src/lib/libc/net/res_random.c
index ebd1831e51..f351454202 100644
--- a/src/lib/libc/net/res_random.c
+++ b/src/lib/libc/net/res_random.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: res_random.c,v 1.5 1997/04/25 07:43:05 provos Exp $ */ 1/* $OpenBSD: res_random.c,v 1.6 1997/04/30 05:57:03 tholo Exp $ */
2 2
3/* 3/*
4 * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de> 4 * Copyright 1997 Niels Provos <provos@physnet.uni-hamburg.de>
@@ -100,9 +100,14 @@ static void res_initid __P((void));
100 * of 0 - (mod-1) 100 * of 0 - (mod-1)
101 */ 101 */
102 102
103#if __STDC__
104static u_int16_t
105pmod(u_int16_t gen, u_int16_t exp, u_int16_t mod)
106#else
103static u_int16_t 107static u_int16_t
104pmod(gen, exp, mod) 108pmod(gen, exp, mod)
105 u_int16_t gen, exp, mod; 109 u_int16_t gen, exp, mod;
110#endif
106{ 111{
107 u_int16_t s, t, u; 112 u_int16_t s, t, u;
108 113