summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-07-13 19:57:43 -0400
committerTavian Barnes <tavianator@tavianator.com>2016-07-13 19:57:43 -0400
commitd0119ee5efa56c32f956027f58673a6b3da7ac46 (patch)
tree6e326c76853255065a3ae28cfbe5942b4dfb8533 /eval.c
parent5a4a805a4d460a6996facc5d1fd06986344c899b (diff)
downloadbfs-d0119ee5efa56c32f956027f58673a6b3da7ac46.tar.xz
Use a linked list to store the root paths.
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) {