diff options
Diffstat (limited to 'lib/libc/net/gethostbynis.c')
-rw-r--r-- | lib/libc/net/gethostbynis.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/libc/net/gethostbynis.c b/lib/libc/net/gethostbynis.c index 45aed33..ca1a9a5 100644 --- a/lib/libc/net/gethostbynis.c +++ b/lib/libc/net/gethostbynis.c @@ -50,7 +50,7 @@ __FBSDID("$FreeBSD$"); #ifdef YP static int _gethostbynis(const char *name, char *map, int af, struct hostent *he, - struct hostent_data *hed, int mapped) + struct hostent_data *hed) { char *p, *bp, *ep; char *cp, **q; @@ -101,7 +101,7 @@ _gethostbynis(const char *name, char *map, int af, struct hostent *he, addrok = inet_aton(result, (struct in_addr *)hed->host_addr); if (addrok != 1) break; - if (mapped) { + if (_res.options & RES_USE_INET6) { _map_v4v6_address((char *)hed->host_addr, (char *)hed->host_addr); af = AF_INET6; @@ -172,8 +172,7 @@ _gethostbynisname_r(const char *name, int af, struct hostent *he, map = "ipnodes.byname"; break; } - return _gethostbynis(name, map, af, he, hed, - _res.options & RES_USE_INET6); + return _gethostbynis(name, map, af, he, hed); } static int @@ -193,7 +192,7 @@ _gethostbynisaddr_r(const char *addr, int len, int af, struct hostent *he, } if (inet_ntop(af, addr, numaddr, sizeof(numaddr)) == NULL) return -1; - return _gethostbynis(numaddr, map, af, he, hed, 0); + return _gethostbynis(numaddr, map, af, he, hed); } #endif /* YP */ |