This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] nss_files: Use struct scratch_buffer for gethostbyname [BZ #18023]
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: Florian Weimer <fweimer at redhat dot com>, libc-alpha at sourceware dot org
- Date: Wed, 11 Oct 2017 09:18:39 -0300
- Subject: Re: [PATCH] nss_files: Use struct scratch_buffer for gethostbyname [BZ #18023]
- Authentication-results: sourceware.org; auth=none
- References: <20170904173123.9C550439942E3@oldenburg.str.redhat.com> <426c9fe6-2b88-96c0-2382-651cf30f2db8@linaro.org> <81d77843-06c8-ec51-23b1-542a90d5af4e@redhat.com> <864301dd-4e83-30ec-d690-b2dbaa3864dc@redhat.com> <544e1d74-4c6f-821c-2094-53df5f7179db@redhat.com>
On 11/10/2017 02:04, Florian Weimer wrote:
> On 10/10/2017 03:01 PM, Florian Weimer wrote:
>> On 09/05/2017 08:38 PM, Florian Weimer wrote:
>>
>>>> I do think this it is easier to read and follow the code *without* the goto,
>>>> something like:
>>>>
>>>> scratch_buffer_init (...);
>>>> while (1)
>>>> {
>>>> while ((status = internal_getent (...)) == NSS_STATUS_SUCCESS)
>>>> {
>>>> ...
>>>> }
>>>> if (status == NSS_STATUS_TRYAGAIN)
>>>> if (!scratch_buffer_grow (&tmp_buffer))
>>>> {
>>>> *herrnop = NETDB_INTERNAL;
>>>> status = NSS_STATUS_TRYAGAIN;
>>>> break;
>>>> }
>>>> else
>>>> status = NSS_STATUS_SUCCESS;
>>>> }
>>>> scratch_buffer_free (...);
>>>
>>> Right, I think I'll make this change in the first (refactoring) patch.
>>
>> I made this change in this patch instead. Still okay?
>
> I'm going to push this because you've already acked the subsequent patch.
LGTM, I though I had acked this patch as well (I did spend some time yesterday
checking the new version).