diff options
author | keerthi <none@none> | 2007-07-17 12:14:35 -0700 |
---|---|---|
committer | keerthi <none@none> | 2007-07-17 12:14:35 -0700 |
commit | ec486a10533685f85470b45a25ee612e86042742 (patch) | |
tree | a63e7211f8ea2b010c50267c5288c7f49e60aa9d /usr/src/cmd/find | |
parent | 53ed03b54d7e8d004eeb46c17e2cfd6b4616945f (diff) | |
download | illumos-gate-ec486a10533685f85470b45a25ee612e86042742.tar.gz |
6513046 find incorrectly processes action arguments if multiple paths and no
-print
Diffstat (limited to 'usr/src/cmd/find')
-rw-r--r-- | usr/src/cmd/find/find.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/usr/src/cmd/find/find.c b/usr/src/cmd/find/find.c index 76878a4e39..6895549994 100644 --- a/usr/src/cmd/find/find.c +++ b/usr/src/cmd/find/find.c @@ -203,7 +203,6 @@ static char *gettail(); static int walkflags = FTW_CHDIR|FTW_PHYS|FTW_ANYERR|FTW_NOLOOP; -static struct Node *savetnode; static struct Node *topnode; static struct Node *freenode; /* next free node we may use later */ static char *cpio[] = { "cpio", "-o", 0 }; @@ -291,9 +290,7 @@ main(int argc, char **argv) /* allocate enough space for the compiler */ topnode = malloc((argc + 1) * sizeof (struct Node)); - savetnode = malloc((argc + 1) * sizeof (struct Node)); (void) memset(topnode, 0, (argc + 1) * sizeof (struct Node)); - (void) memset(savetnode, 0, (argc + 1) * sizeof (struct Node)); if (compile(argv + paths, topnode, &action_expression) == 0) { /* no expression, default to -print */ @@ -318,7 +315,6 @@ main(int argc, char **argv) topnode->first.np = savenode; (void) memcpy(topnode->next, &PRINT_NODE, sizeof (struct Node)); } - (void) memcpy(savetnode, topnode, ((argc + 1) * sizeof (struct Node))); while (paths--) { char *curpath; @@ -361,9 +357,6 @@ main(int argc, char **argv) error = 1; } - if (paths > 1) - (void) memcpy(topnode, savetnode, - ((argc + 1) * sizeof (struct Node))); } /* execute any remaining variable length lists */ |