diff options
author | nectar <nectar@FreeBSD.org> | 2000-09-07 02:18:22 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2000-09-07 02:18:22 +0000 |
commit | 5450aa20ea5485db8cd0174f05360cec6d0f66f3 (patch) | |
tree | eeaf5bc39bb14b12aee3c088e553c1eefe400e80 /lib/libc | |
parent | 769e0f974d8929599ba599ac496510fffc90ff34 (diff) | |
download | FreeBSD-src-5450aa20ea5485db8cd0174f05360cec6d0f66f3.zip FreeBSD-src-5450aa20ea5485db8cd0174f05360cec6d0f66f3.tar.gz |
Fix getipnodebyname(3) bug.
Submitted by: ume
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/net/name6.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/net/name6.c b/lib/libc/net/name6.c index ea08d92..36df9a0 100644 --- a/lib/libc/net/name6.c +++ b/lib/libc/net/name6.c @@ -235,7 +235,7 @@ static struct hostent * _ghbyname(const char *name, int af, int flags, int *errp) { struct hostent *hp; - int i, rval; + int rval; static const ns_dtab dtab[] = { NS_FILES_CB(_files_ghbyname, NULL) @@ -360,7 +360,7 @@ struct hostent * getipnodebyaddr(const void *src, size_t len, int af, int *errp) { struct hostent *hp; - int i, rval; + int rval; #ifdef INET6 struct in6_addr addrbuf; #else @@ -769,7 +769,7 @@ _files_ghbyname(void *rval, void *cb_data, va_list ap) char *aliases[MAXALIASES + 1], *addrs[2]; union inx_addr addrbuf; char buf[BUFSIZ]; - int af0 = af; + int af0; name = va_arg(ap, const char *); af = va_arg(ap, int); @@ -781,6 +781,7 @@ _files_ghbyname(void *rval, void *cb_data, va_list ap) return NS_UNAVAIL; rethp = hp = NULL; + af0 = af; while (fgets(buf, sizeof(buf), fp)) { line = buf; if ((addrstr = _hgetword(&line)) == NULL |