This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Use herrnop directly instead of H_ERRNO_ARGS
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: libc-alpha at sourceware dot org
- Date: Mon, 25 Nov 2013 20:38:27 +0530
- Subject: [PATCH] Use herrnop directly instead of H_ERRNO_ARGS
- Authentication-results: sourceware.org; auth=none
Hi,
_nss_files_gethostbyname4_r uses H_ERRNO_ARGS unnecessarily when it
can use herrnop directly. The file files-hosts.c is used only for
hosts lookup and we won't have a case where H_ERRNO is not defined.
OK to commit?
Siddhesh
* nss/nss_files/files-hosts.c (_nss_files_gethostbyname4_r):
Use HERRNOP directly.
diff --git a/nss/nss_files/files-hosts.c b/nss/nss_files/files-hosts.c
index 6db2535..b1b71ec 100644
--- a/nss/nss_files/files-hosts.c
+++ b/nss/nss_files/files-hosts.c
@@ -392,8 +392,8 @@ _nss_files_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat,
buflen = buflen > pad ? buflen - pad : 0;
struct hostent result;
- status = internal_getent (&result, buffer, buflen, errnop
- H_ERRNO_ARG, AF_UNSPEC, 0);
+ status = internal_getent (&result, buffer, buflen, errnop,
+ herrnop, AF_UNSPEC, 0);
if (status != NSS_STATUS_SUCCESS)
break;