diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2016-07-13 19:57:43 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2016-07-13 19:57:43 -0400 |
commit | d0119ee5efa56c32f956027f58673a6b3da7ac46 (patch) | |
tree | 6e326c76853255065a3ae28cfbe5942b4dfb8533 /eval.c | |
parent | 5a4a805a4d460a6996facc5d1fd06986344c899b (diff) | |
download | bfs-d0119ee5efa56c32f956027f58673a6b3da7ac46.tar.xz |
Use a linked list to store the root paths.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) { |