summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/res_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libc/net/res_init.c')
-rw-r--r--src/lib/libc/net/res_init.c20
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 @@
60static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; 60static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
61static char rcsid[] = "$From: res_init.c,v 8.7 1996/09/28 06:51:07 vixie Exp $"; 61static char rcsid[] = "$From: res_init.c,v 8.7 1996/09/28 06:51:07 vixie Exp $";
62#else 62#else
63static char rcsid[] = "$OpenBSD: res_init.c,v 1.30 2004/06/07 21:11:23 marc Exp $"; 63static 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 */
155int 155int
156res_init() 156res_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 */
573static void 573static void
574res_setoptions(options, source) 574res_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. */
634static u_int32_t 633static u_int32_t
635net_mask(in) /* XXX - should really use system's version of this */ 634net_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));