summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-01-31 20:58:43 -0500
committerTavian Barnes <tavianator@tavianator.com>2024-01-31 21:05:31 -0500
commit670ebd97fb431e830b1500b2e7e8013b121fb2c5 (patch)
tree6c63d7a1c4bb6702040d970b6db3786dfe1e4aa8 /src
parenta726c7128ab5c6fffeb6844f3d819ada0369e6a8 (diff)
downloadbfs-670ebd97fb431e830b1500b2e7e8013b121fb2c5.tar.xz
bftw: Actually stop if the callback returns BFTW_STOP
Otherwise, bftw_ids() or bftw_eds() might keep going! Fixes: 5f16169 ("bftw: Share the bftw_state between iterations of ids/eds")
Diffstat (limited to 'src')
-rw-r--r--src/bftw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bftw.c b/src/bftw.c
index ab930f1..c9ba67e 100644
--- a/src/bftw.c
+++ b/src/bftw.c
@@ -1791,7 +1791,7 @@ static int bftw_impl(struct bftw_state *state) {
break;
}
if (bftw_visit(state, NULL) != 0) {
- break;
+ return -1;
}
}