Updates from both Vladimir and Larry
[oweals/busybox.git] / gunzip.c
index ed4a3de36932c8c7b72294a1b1e7093a6cf148f0..c39814de05218f4227242b693869d03efdeb514c 100644 (file)
--- a/gunzip.c
+++ b/gunzip.c
@@ -102,6 +102,7 @@ extern int gunzip_main(int argc, char **argv)
                        break;
                case 'q':
                        error_msg("-q option not supported, ignored");
+                       break;
                case 'h':
                default:
                        show_usage(); /* exit's inside usage */
@@ -109,7 +110,7 @@ extern int gunzip_main(int argc, char **argv)
        }
 
        /* Set input filename and number */
-       if (argv[optind] == NULL) {
+       if (argv[optind] == NULL || strcmp(argv[optind], "-") == 0) {
                flags |= gunzip_to_stdout;
                in_file = stdin;
        } else {