diff options
-rw-r--r-- | archival/gunzip.c | 2 | ||||
-rw-r--r-- | gunzip.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/archival/gunzip.c b/archival/gunzip.c index 6f5e63d4b..c39814de0 100644 --- a/archival/gunzip.c +++ b/archival/gunzip.c @@ -110,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 { @@ -110,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 { |