This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[ping][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, 2 Dec 2013 11:23:36 +0530
- Subject: [ping][PATCH] Use herrnop directly instead of H_ERRNO_ARGS
- Authentication-results: sourceware.org; auth=none
- References: <20131125150826 dot GS19834 at spoyarek dot pnq dot redhat dot com>
Ping!
On Mon, Nov 25, 2013 at 08:38:27PM +0530, Siddhesh Poyarekar wrote:
> 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;
>