From e6b4e2de6dd91efdcac80b79149c596de8a26b70 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 27 Jun 2017 09:26:46 +0200 Subject: resolv: Call _res_hconf_init from __res_vinit Many callers of __res_maybe_init also call _res_hconf_init. Additional calls to the latter do not hurt because the function does its work only once. (/etc/hosts.conf is not reloaded or even checked for changes.) This means that we can simplify the code by calling _res_hconf_init directly from __res_vinit. --- sysdeps/posix/getaddrinfo.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'sysdeps/posix/getaddrinfo.c') diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index 91e0a76c5c..4fb1eaef79 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -80,7 +80,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include -#include #include #include @@ -767,7 +766,6 @@ gaih_inet (const char *name, const struct gaih_service *service, nip = __nss_hosts_database; /* Initialize configurations. */ - _res_hconf_init (); if (__res_maybe_init (&_res, 0) == -1) no_more = 1; -- cgit 1.4.1