aboutsummaryrefslogtreecommitdiff
path: root/nss
diff options
context:
space:
mode:
Diffstat (limited to 'nss')
-rw-r--r--nss/digits_dots.c2
-rw-r--r--nss/getXXbyYY_r.c2
-rw-r--r--nss/getnssent_r.c11
3 files changed, 6 insertions, 9 deletions
diff --git a/nss/digits_dots.c b/nss/digits_dots.c
index 17207945b9..9576dd53b7 100644
--- a/nss/digits_dots.c
+++ b/nss/digits_dots.c
@@ -43,7 +43,7 @@ __nss_hostname_digits_dots (const char *name, struct hostent *resbuf,
/* We have to test for the use of IPv6 which can only be done by
examining `_res'. */
- if ((_res.options & RES_INIT) == 0 && __res_ninit (&_res) == -1)
+ if (__res_maybe_init (&_res, 0) == -1)
{
if (h_errnop)
*h_errnop = NETDB_INTERNAL;
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c
index 6338aa5905..9e425ce55e 100644
--- a/nss/getXXbyYY_r.c
+++ b/nss/getXXbyYY_r.c
@@ -182,7 +182,7 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
#ifdef NEED__RES
/* The resolver code will really be used so we have to
initialize it. */
- if ((_res.options & RES_INIT) == 0 && __res_ninit (&_res) == -1)
+ if (__res_maybe_init (&_res, 0) == -1)
{
*h_errnop = NETDB_INTERNAL;
*result = NULL;
diff --git a/nss/getnssent_r.c b/nss/getnssent_r.c
index 7545b80c4a..a0cfa72bd2 100644
--- a/nss/getnssent_r.c
+++ b/nss/getnssent_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000,02 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -60,8 +60,7 @@ __nss_setent (const char *func_name, db_lookup_function lookup_fct,
} fct;
int no_more;
- if (res && (_res.options & RES_INIT) == 0
- && __res_ninit (&_res) == -1)
+ if (res && __res_maybe_init (&_res, 0) == -1)
{
__set_h_errno (NETDB_INTERNAL);
return;
@@ -104,8 +103,7 @@ __nss_endent (const char *func_name, db_lookup_function lookup_fct,
} fct;
int no_more;
- if (res && (_res.options & RES_INIT) == 0
- && __res_ninit (&_res) == -1)
+ if (res && __res_maybe_init (&_res, 0) == -1)
{
__set_h_errno (NETDB_INTERNAL);
return;
@@ -145,8 +143,7 @@ __nss_getent_r (const char *getent_func_name,
int no_more;
enum nss_status status;
- if (res && (_res.options & RES_INIT) == 0
- && __res_ninit (&_res) == -1)
+ if (res && __res_maybe_init (&_res, 0) == -1)
{
*h_errnop = NETDB_INTERNAL;
*result = NULL;