summaryrefslogtreecommitdiff
path: root/lib/libc/net
diff options
context:
space:
mode:
authorHajimu UMEMOTO <ume@FreeBSD.org>2005-04-28 17:44:44 +0000
committerHajimu UMEMOTO <ume@FreeBSD.org>2005-04-28 17:44:44 +0000
commit7b671d902bb803d5624f344f400b89833ecedf28 (patch)
treeece087f9bcb557d697f21b9d5f506da519174ed6 /lib/libc/net
parent0c3757df94c02269511479e61f125687cb2bb1ae (diff)
Notes
Diffstat (limited to 'lib/libc/net')
-rw-r--r--lib/libc/net/name6.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/lib/libc/net/name6.c b/lib/libc/net/name6.c
index 428101523689..9df78428ec4f 100644
--- a/lib/libc/net/name6.c
+++ b/lib/libc/net/name6.c
@@ -1387,17 +1387,14 @@ _nis_ghbyname(void *rval, void *cb_data, va_list ap)
af = va_arg(ap, int);
errp = va_arg(ap, int *);
- if (af == AF_INET) {
- THREAD_LOCK();
- hp = _gethostbynisname(name, af);
- if (hp != NULL)
- hp = _hpcopy(hp, errp);
- THREAD_UNLOCK();
- }
-
+ THREAD_LOCK();
+ hp = _gethostbynisname(name, af);
+ if (hp != NULL)
+ hp = _hpcopy(hp, errp);
+ THREAD_UNLOCK();
+
*(struct hostent **)rval = hp;
return (hp != NULL) ? NS_SUCCESS : NS_NOTFOUND;
-
}
static int
@@ -1413,13 +1410,11 @@ _nis_ghbyaddr(void *rval, void *cb_data, va_list ap)
addrlen = va_arg(ap, int);
af = va_arg(ap, int);
- if (af == AF_INET) {
- THREAD_LOCK();
- hp = _gethostbynisaddr(addr, addrlen, af);
- if (hp != NULL)
- hp = _hpcopy(hp, errp);
- THREAD_UNLOCK();
- }
+ THREAD_LOCK();
+ hp = _gethostbynisaddr(addr, addrlen, af);
+ if (hp != NULL)
+ hp = _hpcopy(hp, errp);
+ THREAD_UNLOCK();
*(struct hostent **)rval = hp;
return (hp != NULL) ? NS_SUCCESS : NS_NOTFOUND;
}