aboutsummaryrefslogtreecommitdiff
path: root/gzip.c
diff options
context:
space:
mode:
Diffstat (limited to 'gzip.c')
-rw-r--r--gzip.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gzip.c b/gzip.c
index 591b8cc7f..c0832680f 100644
--- a/gzip.c
+++ b/gzip.c
@@ -1802,9 +1802,6 @@ int gzip_main(int argc, char **argv)
int fromstdin = 0;
int force = 0;
- if (argc == 1)
- usage(gzip_usage);
-
/* Parse any options */
while (--argc > 0 && **(++argv) == '-') {
if (*((*argv) + 1) == '\0') {
@@ -1827,8 +1824,10 @@ int gzip_main(int argc, char **argv)
}
}
}
- if (argc <= 0)
+ if (argc <= 0 ) {
fromstdin = 1;
+ tostdout = 1;
+ }
if (isatty(fileno(stdin)) && fromstdin==1 && force==0)
fatalError( "data not read from terminal. Use -f to force it.\n");