sbase

suckless unix tools
git clone git://git.suckless.org/sbase
Log | Files | Refs | README | LICENSE

commit 60895834f011acb7ec3d6ef6e35f2daa23007ff9
parent f4b9b966cf67aecd551dc2daa2398727a76ab1c1
Author: Michael Forney <mforney@mforney.org>
Date:   Sat, 28 Dec 2019 22:35:49 -0800

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

Diffstat:
Mlibutil/recurse.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libutil/recurse.c b/libutil/recurse.c @@ -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);