diff options
Diffstat (limited to 'archival/gzip.c')
-rw-r--r-- | archival/gzip.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/archival/gzip.c b/archival/gzip.c index 37fefbf6a..ad2c24df1 100644 --- a/archival/gzip.c +++ b/archival/gzip.c | |||
@@ -1212,9 +1212,7 @@ int gzip_main(int argc, char **argv) | |||
1212 | time_stamp = statBuf.st_ctime; | 1212 | time_stamp = statBuf.st_ctime; |
1213 | 1213 | ||
1214 | if (!tostdout) { | 1214 | if (!tostdout) { |
1215 | path = xmalloc(strlen(argv[i]) + 4); | 1215 | path = xasprintf("%s.gz", argv[i]); |
1216 | strcpy(path, argv[i]); | ||
1217 | strcat(path, ".gz"); | ||
1218 | 1216 | ||
1219 | /* Open output file */ | 1217 | /* Open output file */ |
1220 | #if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1) && defined O_NOFOLLOW | 1218 | #if (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1) && defined O_NOFOLLOW |