On 11/01/2016 04:32 PM, Bernhard Voelker wrote: > >> However, > >>> +++ b/lib/fdleak.c > >>> - while ((dent=readdir (dir)) != NULL) - { + while (1) + >>> { + errno = 0; > > __________^^^^^^^^^^
Uggh. Mail clients botched the formatting. > >>> + dent = readdir (dir); > > > errno _is_ initialized right before each readdir() call, see above, > so I don't see the problem here. Whoops - blame a late-day review on my part. You're right - the first file did readdir() inside the for loop; the second does readdir() inside a while(1) loop. Okay, I stand corrected, the second file is indeed fine (because it DOES reset errno each time); but you are right that adding a comment to the first file will help. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature