summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index 48603fb..dfc04ce 100644
--- a/eval.c
+++ b/eval.c
@@ -970,10 +970,10 @@ int eval_cmdline(const struct cmdline *cmdline) {
.ret = 0,
};
- for (size_t i = 0; i < cmdline->nroots; ++i) {
+ for (struct root *root = cmdline->roots; root; root = root->next) {
args.last_error = 0;
- if (bftw(cmdline->roots[i], cmdline_callback, nopenfd, cmdline->flags, &args) != 0) {
+ if (bftw(root->path, cmdline_callback, nopenfd, cmdline->flags, &args) != 0) {
args.ret = -1;
if (errno != args.last_error) {