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)
1802 int fromstdin = 0; 1802 int fromstdin = 0;
1803 int force = 0; 1803 int force = 0;
1804 1804
1805 if (argc == 1)
1806 usage(gzip_usage);
1807
1808 /* Parse any options */ 1805 /* Parse any options */
1809 while (--argc > 0 && **(++argv) == '-') { 1806 while (--argc > 0 && **(++argv) == '-') {
1810 if (*((*argv) + 1) == '\0') { 1807 if (*((*argv) + 1) == '\0') {
@@ -1827,8 +1824,10 @@ int gzip_main(int argc, char **argv)
1827 } 1824 }
1828 } 1825 }
1829 } 1826 }
1830 if (argc <= 0) 1827 if (argc <= 0 ) {
1831 fromstdin = 1; 1828 fromstdin = 1;
1829 tostdout = 1;
1830 }
1832 1831
1833 if (isatty(fileno(stdin)) && fromstdin==1 && force==0) 1832 if (isatty(fileno(stdin)) && fromstdin==1 && force==0)
1834 fatalError( "data not read from terminal. Use -f to force it.\n"); 1833 fatalError( "data not read from terminal. Use -f to force it.\n");