This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v1.1] Deduplicate resolv/nss_dns/dns-host.c
- From: Allan McRae <allan at archlinux dot org>
- To: OndÅej BÃlka <neleai at seznam dot cz>, Mike Frysinger <vapier at gentoo dot org>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 04 Jul 2014 10:41:25 +1000
- Subject: Re: [PATCH v1.1] Deduplicate resolv/nss_dns/dns-host.c
- Authentication-results: sourceware.org; auth=none
- References: <20140213123812 dot GB14778 at domone dot podge> <2173663 dot ICIzkxrumV at vapier> <20140215113919 dot GA29817 at domone dot podge>
On 15/02/14 21:39, OndÅej BÃlka wrote:
> On Fri, Feb 14, 2014 at 12:25:51PM -0500, Mike Frysinger wrote:
>> On Thursday, February 13, 2014 13:38:12 OndÅej BÃlka wrote:
>>> Hi, when reviewing Andreas patch I noticed duplicated code. One way to
>>> improve that is jump to exit logic. A second possibility would be put
>>> gaih_getanswer into a else block. What do you prefer?
>>
>> i don't mind either, but i think generally the preference is to avoid goto
>> when easily possible. so in this case, use the else.
>> -mike
>
> OK, patch for this is following. It should cover one extra possibility when
> __libc_res_nsearch fails and allocates separate buffer.
>
> * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyname4_r): Remove
> duplicate code
>
OndÅej: This was committed without a ChangeLog entry. Can you insert
one in the appropriate place.
Thanks,
Allan