aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/cp.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-05-10 00:21:42 -0500
committerRob Landley <rob@landley.net>2015-05-10 00:21:42 -0500
commit1f5f436826505df6dfabe1de9724424fc40fae23 (patch)
treebebeeec774350ad01c68481bda59afe6f49a3fe7 /toys/posix/cp.c
parentaab9164df395a4b0878b0ad930a5ec8a806a58e9 (diff)
downloadtoybox-1f5f436826505df6dfabe1de9724424fc40fae23.tar.gz
Cleanups of dirtree_start() calls. (Don't need to feed in flag values, just
symfollow true/false.)
Diffstat (limited to 'toys/posix/cp.c')
-rw-r--r--toys/posix/cp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/toys/posix/cp.c b/toys/posix/cp.c
index df8269f3..803bff85 100644
--- a/toys/posix/cp.c
+++ b/toys/posix/cp.c
@@ -340,9 +340,8 @@ void cp_main(void)
// Skip nonexistent sources
if (rc) {
- int symfollow = DIRTREE_SYMFOLLOW*!!(toys.optflags & (FLAG_H|FLAG_L));
-
- if (errno != EXDEV || !(new = dirtree_start(src, symfollow)))
+ if (errno!=EXDEV ||
+ !(new = dirtree_start(src, toys.optflags&(FLAG_H|FLAG_L))))
perror_msg("bad '%s'", src);
else dirtree_handle_callback(new, TT.callback);
}