libutil/recurse: Use while-loop instead of for-loop with only condition

This commit is contained in:
Michael Forney 2019-12-28 22:35:49 -08:00
parent f4b9b966cf
commit 60895834f0

View File

@ -96,7 +96,7 @@ recurse(const char *path, void *data, struct recursor *r)
if (!(r->flags & DIRFIRST))
r->fn(path, &st, data, r);
for (; r->hist; ) {
while (r->hist) {
h = r->hist;
r->hist = r->hist->prev;
free(h);