aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-10-12 17:24:26 -0500
committerRob Landley <rob@landley.net>2019-10-12 17:24:26 -0500
commitf69ca9e9d29c9dfde2860f7d60d57fdbfde856a0 (patch)
tree9eb089c93a575bf450eebb3b81cf6190a2ad5d82 /toys
parent0cc9d996ed3fe49b34fdf0943523e880203e5be5 (diff)
downloadtoybox-f69ca9e9d29c9dfde2860f7d60d57fdbfde856a0.tar.gz
Don't need the second variable, and put the comment back.
Diffstat (limited to 'toys')
-rw-r--r--toys/posix/find.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/toys/posix/find.c b/toys/posix/find.c
index 433ea5bd..8a837385 100644
--- a/toys/posix/find.c
+++ b/toys/posix/find.c
@@ -681,7 +681,7 @@ error:
void find_main(void)
{
int i, len;
- char **ss = toys.optargs, **dotifnopaths = (char *[]){"."};
+ char **ss = (char *[]){"."};
TT.topdir = -1;
TT.max_bytes = sysconf(_SC_ARG_MAX) - environ_bytes();
@@ -691,7 +691,9 @@ void find_main(void)
if (strchr("-!(", *toys.optargs[len])) break;
TT.filter = toys.optargs+len;
- if (!len) ss = dotifnopaths, len = 1;
+ // use "." if no paths
+ if (len) ss = toys.optargs;
+ else len = 1;
// first pass argument parsing, verify args match up, handle "evaluate once"
TT.now = time(0);