diff options
author | otto <> | 2005-03-25 13:24:12 +0000 |
---|---|---|
committer | otto <> | 2005-03-25 13:24:12 +0000 |
commit | 2f490723a2e673b2457f65c4b06cacb7d700a3e8 (patch) | |
tree | c9dcd3a58da3f7404d9e626fe10abdd67c384fba /src/lib/libc/net/res_init.c | |
parent | 9a03506f8308b6023a12f108a2072feb958607a6 (diff) | |
download | openbsd-2f490723a2e673b2457f65c4b06cacb7d700a3e8.tar.gz openbsd-2f490723a2e673b2457f65c4b06cacb7d700a3e8.tar.bz2 openbsd-2f490723a2e673b2457f65c4b06cacb7d700a3e8.zip |
ansify. ok deraadt@ moritz@
Diffstat (limited to 'src/lib/libc/net/res_init.c')
-rw-r--r-- | src/lib/libc/net/res_init.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/lib/libc/net/res_init.c b/src/lib/libc/net/res_init.c index 79ccada6ee..f4a8d31cb1 100644 --- a/src/lib/libc/net/res_init.c +++ b/src/lib/libc/net/res_init.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: res_init.c,v 1.30 2004/06/07 21:11:23 marc Exp $ */ | 1 | /* $OpenBSD: res_init.c,v 1.31 2005/03/25 13:24:12 otto Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * ++Copyright++ 1985, 1989, 1993 | 4 | * ++Copyright++ 1985, 1989, 1993 |
@@ -60,7 +60,7 @@ | |||
60 | static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; | 60 | static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; |
61 | static char rcsid[] = "$From: res_init.c,v 8.7 1996/09/28 06:51:07 vixie Exp $"; | 61 | static char rcsid[] = "$From: res_init.c,v 8.7 1996/09/28 06:51:07 vixie Exp $"; |
62 | #else | 62 | #else |
63 | static char rcsid[] = "$OpenBSD: res_init.c,v 1.30 2004/06/07 21:11:23 marc Exp $"; | 63 | static char rcsid[] = "$OpenBSD: res_init.c,v 1.31 2005/03/25 13:24:12 otto Exp $"; |
64 | #endif | 64 | #endif |
65 | #endif /* LIBC_SCCS and not lint */ | 65 | #endif /* LIBC_SCCS and not lint */ |
66 | 66 | ||
@@ -153,16 +153,16 @@ struct __res_state_ext _res_ext; | |||
153 | * Return 0 if completes successfully, -1 on error | 153 | * Return 0 if completes successfully, -1 on error |
154 | */ | 154 | */ |
155 | int | 155 | int |
156 | res_init() | 156 | res_init(void) |
157 | { | 157 | { |
158 | struct __res_state *_resp = _THREAD_PRIVATE(_res, _res, &_res); | 158 | struct __res_state *_resp = _THREAD_PRIVATE(_res, _res, &_res); |
159 | #ifdef INET6 | 159 | #ifdef INET6 |
160 | struct __res_state_ext *_res_extp = _THREAD_PRIVATE(_res_ext, _res_ext, | 160 | struct __res_state_ext *_res_extp = _THREAD_PRIVATE(_res_ext, _res_ext, |
161 | &_res_ext); | 161 | &_res_ext); |
162 | #endif | 162 | #endif |
163 | register FILE *fp; | 163 | FILE *fp; |
164 | register char *cp, **pp; | 164 | char *cp, **pp; |
165 | register int n; | 165 | int n; |
166 | char buf[BUFSIZ]; | 166 | char buf[BUFSIZ]; |
167 | int nserv = 0; /* number of nameserver records read from file */ | 167 | int nserv = 0; /* number of nameserver records read from file */ |
168 | int haveenv = 0; | 168 | int haveenv = 0; |
@@ -571,8 +571,7 @@ res_init() | |||
571 | 571 | ||
572 | /* ARGSUSED */ | 572 | /* ARGSUSED */ |
573 | static void | 573 | static void |
574 | res_setoptions(options, source) | 574 | res_setoptions(char *options, char *source) |
575 | char *options, *source; | ||
576 | { | 575 | { |
577 | struct __res_state *_resp = _THREAD_PRIVATE(_res, _res, &_res); | 576 | struct __res_state *_resp = _THREAD_PRIVATE(_res, _res, &_res); |
578 | char *cp = options; | 577 | char *cp = options; |
@@ -632,10 +631,9 @@ res_setoptions(options, source) | |||
632 | #ifdef RESOLVSORT | 631 | #ifdef RESOLVSORT |
633 | /* XXX - should really support CIDR which means explicit masks always. */ | 632 | /* XXX - should really support CIDR which means explicit masks always. */ |
634 | static u_int32_t | 633 | static u_int32_t |
635 | net_mask(in) /* XXX - should really use system's version of this */ | 634 | net_mask(struct in_addr in) /* XXX - should really use system's version of this */ |
636 | struct in_addr in; | ||
637 | { | 635 | { |
638 | register u_int32_t i = ntohl(in.s_addr); | 636 | u_int32_t i = ntohl(in.s_addr); |
639 | 637 | ||
640 | if (IN_CLASSA(i)) | 638 | if (IN_CLASSA(i)) |
641 | return (htonl(IN_CLASSA_NET)); | 639 | return (htonl(IN_CLASSA_NET)); |