Re: [hackers] [sbase] libutil/recurse: Use while-loop instead of for-loop with only condition || Michael Forney
> Author: Michael Forney <mforney_AT_mforney.org>
Hi Michael,
> libutil/recurse: Use while-loop instead of for-loop with only condition
The patch itself shows that, could you explain what it fixes or improve
in your commit messages?
Thanks.
> diff --git a/libutil/recurse.c b/libutil/recurse.c
> index d2dc3ed..487faac 100644
> --- a/libutil/recurse.c
> +++ b/libutil/recurse.c
> _AT_@ -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);
>
Received on Sun Dec 29 2019 - 09:42:21 CET
This archive was generated by hypermail 2.3.0
: Sun Dec 29 2019 - 09:48:22 CET