[PATCH] Use herrnop directly instead of H_ERRNO_ARGS
Siddhesh Poyarekar
siddhesh@redhat.com
Mon Nov 25 19:57:00 GMT 2013
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;
More information about the Libc-alpha
mailing list