summaryrefslogtreecommitdiffhomepage
path: root/coreutils/cat.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/cat.c')
-rw-r--r--coreutils/cat.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/coreutils/cat.c b/coreutils/cat.c
index 1f4ef4af8..758a83e6b 100644
--- a/coreutils/cat.c
+++ b/coreutils/cat.c
@@ -49,14 +49,12 @@ extern int cat_main(int argc, char **argv)
argv++;
while (argc-- > 0) {
- file = fopen(*argv, "r");
+ file = fopen(*(argv++), "r");
if (file == NULL) {
perror(*argv);
exit(FALSE);
}
print_file( file);
- argc--;
- argv++;
}
exit(TRUE);
}