From: Matt Kraai Date: Fri, 14 Jul 2000 06:47:33 +0000 (-0000) Subject: Fix argument parsing. X-Git-Tag: 0_47~249 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b870af09ae1892ab84dd089529675cc2df533e71;p=oweals%2Fbusybox.git Fix argument parsing. --- diff --git a/coreutils/wc.c b/coreutils/wc.c index bad03f791..3b0e589b6 100644 --- a/coreutils/wc.c +++ b/coreutils/wc.c @@ -154,7 +154,7 @@ int wc_main(int argc, char **argv) } wc_file(file, *argv); } else { - while (argc-- > 0 && *argv != '\0' && strlen(*argv)) { + while (argc-- > 0) { file = fopen(*argv, "r"); if (file == NULL) { perror(*argv); diff --git a/wc.c b/wc.c index bad03f791..3b0e589b6 100644 --- a/wc.c +++ b/wc.c @@ -154,7 +154,7 @@ int wc_main(int argc, char **argv) } wc_file(file, *argv); } else { - while (argc-- > 0 && *argv != '\0' && strlen(*argv)) { + while (argc-- > 0) { file = fopen(*argv, "r"); if (file == NULL) { perror(*argv);