xstrdup xargs cleanup from Jeff Garzik
authorEric Andersen <andersen@codepoet.org>
Fri, 23 Mar 2001 17:11:22 +0000 (17:11 -0000)
committerEric Andersen <andersen@codepoet.org>
Fri, 23 Mar 2001 17:11:22 +0000 (17:11 -0000)
findutils/xargs.c
xargs.c

index 01aa5be69a48d0f765c0bf80dfead1fa36586b5d..48adae90a2870dc590fb7a7514abd69baa68485b 100644 (file)
@@ -45,7 +45,7 @@ int xargs_main(int argc, char **argv)
        /* Store the command to be executed (taken from the command line) */
        if (argc == 1) {
                /* default behavior is to echo all the filenames */
-               cmd_to_be_executed = strdup("/bin/echo ");
+               cmd_to_be_executed = xstrdup("/bin/echo ");
        } else {
                /* concatenate all the arguments passed to xargs together */
                int i;
diff --git a/xargs.c b/xargs.c
index 01aa5be69a48d0f765c0bf80dfead1fa36586b5d..48adae90a2870dc590fb7a7514abd69baa68485b 100644 (file)
--- a/xargs.c
+++ b/xargs.c
@@ -45,7 +45,7 @@ int xargs_main(int argc, char **argv)
        /* Store the command to be executed (taken from the command line) */
        if (argc == 1) {
                /* default behavior is to echo all the filenames */
-               cmd_to_be_executed = strdup("/bin/echo ");
+               cmd_to_be_executed = xstrdup("/bin/echo ");
        } else {
                /* concatenate all the arguments passed to xargs together */
                int i;