summaryrefslogtreecommitdiffstats
path: root/bftw.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-04-15 14:34:35 -0400
committerTavian Barnes <tavianator@tavianator.com>2022-04-15 14:34:35 -0400
commitacf934993a8112023f111ae1dfedc90f40e1d496 (patch)
tree71498aed03fb8a0f0a225fa29a3aa349e7bcc455 /bftw.c
parentf12551285e1be84c586f1697a7f864b155ba5706 (diff)
downloadbfs-acf934993a8112023f111ae1dfedc90f40e1d496.tar.xz
bftw: New BFTW_BUFFER flag
Diffstat (limited to 'bftw.c')
-rw-r--r--bftw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bftw.c b/bftw.c
index 687dc03..6f97bf6 100644
--- a/bftw.c
+++ b/bftw.c
@@ -1168,7 +1168,7 @@ static int bftw_stream(const struct bftw_args *args) {
return -1;
}
- assert(!(state.flags & BFTW_SORT));
+ assert(!(state.flags & (BFTW_SORT | BFTW_BUFFER)));
bftw_batch_start(&state);
for (size_t i = 0; i < args->npaths; ++i) {
@@ -1279,7 +1279,7 @@ done:
/** Select bftw_stream() or bftw_batch() appropriately. */
static int bftw_auto(const struct bftw_args *args) {
- if (args->flags & BFTW_SORT) {
+ if (args->flags & (BFTW_SORT | BFTW_BUFFER)) {
return bftw_batch(args);
} else {
return bftw_stream(args);