diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-03-27 10:02:48 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-03-27 10:02:48 +0000 |
commit | 70060d25d23278f6b636a535edca4a0c4006decd (patch) | |
tree | 372a280d63bab86ec9ffddc76ec28b27a7a1b3ee /archival/gunzip.c | |
parent | edd580a088fe67f33036d3732f66f917b1c0a80b (diff) | |
download | busybox-w32-70060d25d23278f6b636a535edca4a0c4006decd.tar.gz busybox-w32-70060d25d23278f6b636a535edca4a0c4006decd.tar.bz2 busybox-w32-70060d25d23278f6b636a535edca4a0c4006decd.zip |
s/fileno\(stdin\)/STDIN_FILENO/g
s/fileno\(stdout\)/STDOUT_FILENO/g
Diffstat (limited to 'archival/gunzip.c')
-rw-r--r-- | archival/gunzip.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/archival/gunzip.c b/archival/gunzip.c index dec53f660..2c4dc49a4 100644 --- a/archival/gunzip.c +++ b/archival/gunzip.c | |||
@@ -98,7 +98,7 @@ extern int gunzip_main(int argc, char **argv) | |||
98 | optind++; | 98 | optind++; |
99 | 99 | ||
100 | if (old_path == NULL || strcmp(old_path, "-") == 0) { | 100 | if (old_path == NULL || strcmp(old_path, "-") == 0) { |
101 | src_fd = fileno(stdin); | 101 | src_fd = STDIN_FILENO; |
102 | opt |= GUNZIP_OPT_STDOUT; | 102 | opt |= GUNZIP_OPT_STDOUT; |
103 | } else { | 103 | } else { |
104 | src_fd = bb_xopen(old_path, O_RDONLY); | 104 | src_fd = bb_xopen(old_path, O_RDONLY); |
@@ -119,7 +119,7 @@ extern int gunzip_main(int argc, char **argv) | |||
119 | if (opt & GUNZIP_OPT_TEST) { | 119 | if (opt & GUNZIP_OPT_TEST) { |
120 | dst_fd = bb_xopen("/dev/null", O_WRONLY); /* why does test use filenum 2 ? */ | 120 | dst_fd = bb_xopen("/dev/null", O_WRONLY); /* why does test use filenum 2 ? */ |
121 | } else if (opt & GUNZIP_OPT_STDOUT) { | 121 | } else if (opt & GUNZIP_OPT_STDOUT) { |
122 | dst_fd = fileno(stdout); | 122 | dst_fd = STDOUT_FILENO; |
123 | } else { | 123 | } else { |
124 | char *extension; | 124 | char *extension; |
125 | 125 | ||
@@ -178,10 +178,10 @@ extern int gunzip_main(int argc, char **argv) | |||
178 | delete_path = new_path; | 178 | delete_path = new_path; |
179 | } | 179 | } |
180 | 180 | ||
181 | if (dst_fd != fileno(stdout)) { | 181 | if (dst_fd != STDOUT_FILENO) { |
182 | close(dst_fd); | 182 | close(dst_fd); |
183 | } | 183 | } |
184 | if (src_fd != fileno(stdin)) { | 184 | if (src_fd != STDIN_FILENO) { |
185 | close(src_fd); | 185 | close(src_fd); |
186 | } | 186 | } |
187 | 187 | ||