diff options
author | tholo <> | 1997-04-30 05:57:05 +0000 |
---|---|---|
committer | tholo <> | 1997-04-30 05:57:05 +0000 |
commit | 338dd5e3bd9186a615bf2c0e20ef71f54d963318 (patch) | |
tree | 2c4da3faa35998f7804562a16df674b6b3f82af8 /src/lib/libc/net/res_random.c | |
parent | 37e5d720409522b387b468b7718497edd2b859a9 (diff) | |
download | openbsd-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.c | 7 |
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__ | ||
104 | static u_int16_t | ||
105 | pmod(u_int16_t gen, u_int16_t exp, u_int16_t mod) | ||
106 | #else | ||
103 | static u_int16_t | 107 | static u_int16_t |
104 | pmod(gen, exp, mod) | 108 | pmod(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 | ||