This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Use herrnop directly instead of H_ERRNO_ARGS


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;
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]