[hackers] [sbase] libutil/recurse: Use while-loop instead of for-loop with only condition || Michael Forney

From: <git_AT_suckless.org>
Date: Sun, 29 Dec 2019 07:39:39 +0100 (CET)

commit 60895834f011acb7ec3d6ef6e35f2daa23007ff9
Author: Michael Forney <mforney_AT_mforney.org>
AuthorDate: Sat Dec 28 22:35:49 2019 -0800
Commit: Michael Forney <mforney_AT_mforney.org>
CommitDate: Sat Dec 28 22:38:17 2019 -0800

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

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 - 07:39:39 CET

This archive was generated by hypermail 2.3.0 : Sun Dec 29 2019 - 07:48:22 CET