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]

Re: [PATCH] nss_files: Use struct scratch_buffer for gethostbyname [BZ #18023]


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.

Thanks,
Florian


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