xstrdup xargs cleanup from Jeff Garzik
This commit is contained in:
@ -45,7 +45,7 @@ int xargs_main(int argc, char **argv)
|
|||||||
/* Store the command to be executed (taken from the command line) */
|
/* Store the command to be executed (taken from the command line) */
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
/* default behavior is to echo all the filenames */
|
/* default behavior is to echo all the filenames */
|
||||||
cmd_to_be_executed = strdup("/bin/echo ");
|
cmd_to_be_executed = xstrdup("/bin/echo ");
|
||||||
} else {
|
} else {
|
||||||
/* concatenate all the arguments passed to xargs together */
|
/* concatenate all the arguments passed to xargs together */
|
||||||
int i;
|
int i;
|
||||||
|
2
xargs.c
2
xargs.c
@ -45,7 +45,7 @@ int xargs_main(int argc, char **argv)
|
|||||||
/* Store the command to be executed (taken from the command line) */
|
/* Store the command to be executed (taken from the command line) */
|
||||||
if (argc == 1) {
|
if (argc == 1) {
|
||||||
/* default behavior is to echo all the filenames */
|
/* default behavior is to echo all the filenames */
|
||||||
cmd_to_be_executed = strdup("/bin/echo ");
|
cmd_to_be_executed = xstrdup("/bin/echo ");
|
||||||
} else {
|
} else {
|
||||||
/* concatenate all the arguments passed to xargs together */
|
/* concatenate all the arguments passed to xargs together */
|
||||||
int i;
|
int i;
|
||||||
|
Reference in New Issue
Block a user