about summary refs log tree commit diff
path: root/resolv/nss_dns/dns-host.c
diff options
context:
space:
mode:
Diffstat (limited to 'resolv/nss_dns/dns-host.c')
-rw-r--r--resolv/nss_dns/dns-host.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
index 0424cb9e2a..91699cc50d 100644
--- a/resolv/nss_dns/dns-host.c
+++ b/resolv/nss_dns/dns-host.c
@@ -145,7 +145,7 @@ _nss_dns_gethostbyname2_r (const char *name, int af, struct hostent *result,
   int olderr = errno;
   enum nss_status status;
 
-  if ((_res.options & RES_INIT) == 0 && __res_ninit (&_res) == -1)
+  if (__res_maybe_init (&_res, 0) == -1)
     return NSS_STATUS_UNAVAIL;
 
   switch (af) {
@@ -263,7 +263,7 @@ _nss_dns_gethostbyaddr_r (const void *addr, socklen_t len, int af,
   int n, status;
   int olderr = errno;
 
-  if ((_res.options & RES_INIT) == 0 && __res_ninit (&_res) == -1)
+  if (__res_maybe_init (&_res, 0) == -1)
     return NSS_STATUS_UNAVAIL;
 
   if (af == AF_INET6 && len == IN6ADDRSZ