aboutsummaryrefslogtreecommitdiff
path: root/archival/gunzip.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-03-27 10:02:48 +0000
committerEric Andersen <andersen@codepoet.org>2004-03-27 10:02:48 +0000
commit70060d25d23278f6b636a535edca4a0c4006decd (patch)
tree372a280d63bab86ec9ffddc76ec28b27a7a1b3ee /archival/gunzip.c
parentedd580a088fe67f33036d3732f66f917b1c0a80b (diff)
downloadbusybox-70060d25d23278f6b636a535edca4a0c4006decd.tar.gz
s/fileno\(stdin\)/STDIN_FILENO/g
s/fileno\(stdout\)/STDOUT_FILENO/g
Diffstat (limited to 'archival/gunzip.c')
-rw-r--r--archival/gunzip.c8
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)
optind++;
if (old_path == NULL || strcmp(old_path, "-") == 0) {
- src_fd = fileno(stdin);
+ src_fd = STDIN_FILENO;
opt |= GUNZIP_OPT_STDOUT;
} else {
src_fd = bb_xopen(old_path, O_RDONLY);
@@ -119,7 +119,7 @@ extern int gunzip_main(int argc, char **argv)
if (opt & GUNZIP_OPT_TEST) {
dst_fd = bb_xopen("/dev/null", O_WRONLY); /* why does test use filenum 2 ? */
} else if (opt & GUNZIP_OPT_STDOUT) {
- dst_fd = fileno(stdout);
+ dst_fd = STDOUT_FILENO;
} else {
char *extension;
@@ -178,10 +178,10 @@ extern int gunzip_main(int argc, char **argv)
delete_path = new_path;
}
- if (dst_fd != fileno(stdout)) {
+ if (dst_fd != STDOUT_FILENO) {
close(dst_fd);
}
- if (src_fd != fileno(stdin)) {
+ if (src_fd != STDIN_FILENO) {
close(src_fd);
}