diff options
Diffstat (limited to 'archival/uncompress.c')
-rw-r--r-- | archival/uncompress.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/archival/uncompress.c b/archival/uncompress.c index 801293fd9..ca775c787 100644 --- a/archival/uncompress.c +++ b/archival/uncompress.c | |||
@@ -5,13 +5,6 @@ | |||
5 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. | 5 | * Licensed under GPLv2 or later, see file LICENSE in this tarball for details. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <stdlib.h> | ||
9 | #include <string.h> | ||
10 | #include <unistd.h> | ||
11 | #include <sys/types.h> | ||
12 | #include <sys/stat.h> | ||
13 | #include <fcntl.h> | ||
14 | |||
15 | #include "busybox.h" | 8 | #include "busybox.h" |
16 | #include "unarchive.h" | 9 | #include "unarchive.h" |
17 | 10 | ||
@@ -36,7 +29,7 @@ int uncompress_main(int argc, char **argv) | |||
36 | src_fd = STDIN_FILENO; | 29 | src_fd = STDIN_FILENO; |
37 | flags |= GUNZIP_TO_STDOUT; | 30 | flags |= GUNZIP_TO_STDOUT; |
38 | } else { | 31 | } else { |
39 | src_fd = bb_xopen(compressed_file, O_RDONLY); | 32 | src_fd = xopen(compressed_file, O_RDONLY); |
40 | } | 33 | } |
41 | 34 | ||
42 | /* Check that the input is sane. */ | 35 | /* Check that the input is sane. */ |
@@ -52,7 +45,7 @@ int uncompress_main(int argc, char **argv) | |||
52 | struct stat stat_buf; | 45 | struct stat stat_buf; |
53 | char *extension; | 46 | char *extension; |
54 | 47 | ||
55 | uncompressed_file = bb_xstrdup(compressed_file); | 48 | uncompressed_file = xstrdup(compressed_file); |
56 | 49 | ||
57 | extension = strrchr(uncompressed_file, '.'); | 50 | extension = strrchr(uncompressed_file, '.'); |
58 | if (!extension || (strcmp(extension, ".Z") != 0)) { | 51 | if (!extension || (strcmp(extension, ".Z") != 0)) { |
@@ -62,7 +55,7 @@ int uncompress_main(int argc, char **argv) | |||
62 | 55 | ||
63 | /* Open output file */ | 56 | /* Open output file */ |
64 | xstat(compressed_file, &stat_buf); | 57 | xstat(compressed_file, &stat_buf); |
65 | dst_fd = bb_xopen3(uncompressed_file, O_WRONLY | O_CREAT, | 58 | dst_fd = xopen3(uncompressed_file, O_WRONLY | O_CREAT, |
66 | stat_buf.st_mode); | 59 | stat_buf.st_mode); |
67 | 60 | ||
68 | /* If unzip succeeds remove the old file */ | 61 | /* If unzip succeeds remove the old file */ |