summaryrefslogtreecommitdiff
path: root/cat.c
diff options
context:
space:
mode:
authorEric Andersen1999-12-08 23:19:36 +0000
committerEric Andersen1999-12-08 23:19:36 +0000
commitabc0f4f8f97b36f2865986374405d091cefea107 (patch)
treeee7605752c6323682f0ef0879cc48f95bdf13e37 /cat.c
parent2285f367e220af9bda9f544945007725a02032dd (diff)
downloadbusybox-abc0f4f8f97b36f2865986374405d091cefea107.zip
busybox-abc0f4f8f97b36f2865986374405d091cefea107.tar.gz
Latest and greatest
Diffstat (limited to 'cat.c')
-rw-r--r--cat.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/cat.c b/cat.c
index 758a83e..0d32efe 100644
--- a/cat.c
+++ b/cat.c
@@ -46,10 +46,9 @@ extern int cat_main(int argc, char **argv)
usage ("cat [file ...]\n");
}
argc--;
- argv++;
- while (argc-- > 0) {
- file = fopen(*(argv++), "r");
+ while (argc-- > 0 && *(argv++) != '\0' && strlen(*argv) ) {
+ file = fopen(*argv, "r");
if (file == NULL) {
perror(*argv);
exit(FALSE);