summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordownsj <>1997-04-03 08:33:06 +0000
committerdownsj <>1997-04-03 08:33:06 +0000
commit6f68cc9987a88fb66ff3bf328cb402bd676eb2cb (patch)
treeb1e9f0fb88fac87d526ca7f16acd4d25530e1c47
parent855e00993d3576aedd34fffbd8fb939d1e1618e7 (diff)
downloadopenbsd-6f68cc9987a88fb66ff3bf328cb402bd676eb2cb.tar.gz
openbsd-6f68cc9987a88fb66ff3bf328cb402bd676eb2cb.tar.bz2
openbsd-6f68cc9987a88fb66ff3bf328cb402bd676eb2cb.zip
hokchar -> _hokchar, and make it non-static. Use it in getnetnamadr.c as
well.
-rw-r--r--src/lib/libc/net/gethostnamadr.c10
-rw-r--r--src/lib/libc/net/getnetnamadr.c10
2 files changed, 13 insertions, 7 deletions
diff --git a/src/lib/libc/net/gethostnamadr.c b/src/lib/libc/net/gethostnamadr.c
index b72118c45c..91a0213403 100644
--- a/src/lib/libc/net/gethostnamadr.c
+++ b/src/lib/libc/net/gethostnamadr.c
@@ -52,7 +52,7 @@
52 */ 52 */
53 53
54#if defined(LIBC_SCCS) && !defined(lint) 54#if defined(LIBC_SCCS) && !defined(lint)
55static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.18 1997/04/03 07:54:01 deraadt Exp $"; 55static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.19 1997/04/03 08:33:03 downsj Exp $";
56#endif /* LIBC_SCCS and not lint */ 56#endif /* LIBC_SCCS and not lint */
57 57
58#include <sys/param.h> 58#include <sys/param.h>
@@ -103,7 +103,7 @@ static void map_v4v6_hostent __P((struct hostent *hp, char **bp, int *len));
103static void addrsort __P((char **, int)); 103static void addrsort __P((char **, int));
104#endif 104#endif
105 105
106static int hokchar __P((const char *)); 106int _hokchar __P((const char *));
107 107
108static const char AskedForGot[] = 108static const char AskedForGot[] =
109 "gethostby*.getanswer: asked for \"%s\", got \"%s\""; 109 "gethostby*.getanswer: asked for \"%s\", got \"%s\"";
@@ -129,8 +129,8 @@ static struct hostent *getanswer __P((const querybuf *, int, const char *,
129 129
130extern int h_errno; 130extern int h_errno;
131 131
132static int 132int
133hokchar(p) 133_hokchar(p)
134 const char *p; 134 const char *p;
135{ 135{
136 char c; 136 char c;
@@ -186,7 +186,7 @@ getanswer(answer, anslen, qname, qtype)
186#ifdef USE_RESOLV_NAME_OK 186#ifdef USE_RESOLV_NAME_OK
187 name_ok = res_dnok; 187 name_ok = res_dnok;
188#else 188#else
189 name_ok = hokchar; 189 name_ok = _hokchar;
190#endif 190#endif
191 break; 191 break;
192 default: 192 default:
diff --git a/src/lib/libc/net/getnetnamadr.c b/src/lib/libc/net/getnetnamadr.c
index 2f4ff3e971..8d892a1bce 100644
--- a/src/lib/libc/net/getnetnamadr.c
+++ b/src/lib/libc/net/getnetnamadr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: getnetnamadr.c,v 1.3 1997/04/03 07:31:55 downsj Exp $ */ 1/* $OpenBSD: getnetnamadr.c,v 1.4 1997/04/03 08:33:06 downsj Exp $ */
2 2
3/* Copyright (c) 1993 Carlos Leandro and Rui Salgueiro 3/* Copyright (c) 1993 Carlos Leandro and Rui Salgueiro
4 * Dep. Matematica Universidade de Coimbra, Portugal, Europe 4 * Dep. Matematica Universidade de Coimbra, Portugal, Europe
@@ -46,7 +46,7 @@ static char sccsid[] = "@(#)getnetbyaddr.c 8.1 (Berkeley) 6/4/93";
46static char sccsid_[] = "from getnetnamadr.c 1.4 (Coimbra) 93/06/03"; 46static char sccsid_[] = "from getnetnamadr.c 1.4 (Coimbra) 93/06/03";
47static char rcsid[] = "$From: getnetnamadr.c,v 8.7 1996/08/05 08:31:35 vixie Exp $"; 47static char rcsid[] = "$From: getnetnamadr.c,v 8.7 1996/08/05 08:31:35 vixie Exp $";
48#else 48#else
49static char rcsid[] = "$OpenBSD: getnetnamadr.c,v 1.3 1997/04/03 07:31:55 downsj Exp $"; 49static char rcsid[] = "$OpenBSD: getnetnamadr.c,v 1.4 1997/04/03 08:33:06 downsj Exp $";
50#endif 50#endif
51#endif /* LIBC_SCCS and not lint */ 51#endif /* LIBC_SCCS and not lint */
52 52
@@ -69,6 +69,8 @@ extern int h_errno;
69struct netent *_getnetbyaddr __P((long net, int type)); 69struct netent *_getnetbyaddr __P((long net, int type));
70struct netent *_getnetbyname __P((const char *name)); 70struct netent *_getnetbyname __P((const char *name));
71 71
72int _hokchar __P((const char *));
73
72#define BYADDR 0 74#define BYADDR 0
73#define BYNAME 1 75#define BYNAME 1
74#define MAXALIASES 35 76#define MAXALIASES 35
@@ -142,7 +144,11 @@ getnetanswer(answer, anslen, net_i)
142 haveanswer = 0; 144 haveanswer = 0;
143 while (--ancount >= 0 && cp < eom) { 145 while (--ancount >= 0 && cp < eom) {
144 n = dn_expand(answer->buf, eom, cp, bp, buflen); 146 n = dn_expand(answer->buf, eom, cp, bp, buflen);
147#ifdef USE_RESOLV_NAME_OK
145 if ((n < 0) || !res_dnok(bp)) 148 if ((n < 0) || !res_dnok(bp))
149#else
150 if ((n < 0) || !_hokchar(bp))
151#endif
146 break; 152 break;
147 cp += n; 153 cp += n;
148 ans[0] = '\0'; 154 ans[0] = '\0';