From 70060d25d23278f6b636a535edca4a0c4006decd Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sat, 27 Mar 2004 10:02:48 +0000 Subject: s/fileno\(stdin\)/STDIN_FILENO/g s/fileno\(stdout\)/STDOUT_FILENO/g --- networking/ftpgetput.c | 4 ++-- networking/nc.c | 2 +- networking/tftp.c | 2 +- networking/wget.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'networking') diff --git a/networking/ftpgetput.c b/networking/ftpgetput.c index a13aaa228..47ffb5d98 100644 --- a/networking/ftpgetput.c +++ b/networking/ftpgetput.c @@ -154,7 +154,7 @@ static int ftp_recieve(ftp_host_info_t *server, FILE *control_stream, } if ((local_path[0] == '-') && (local_path[1] == '\0')) { - fd_local = fileno(stdout); + fd_local = STDOUT_FILENO; do_continue = 0; } @@ -230,7 +230,7 @@ static int ftp_send(ftp_host_info_t *server, FILE *control_stream, /* get the local file */ if ((local_path[0] == '-') && (local_path[1] == '\0')) { - fd_local = fileno(stdin); + fd_local = STDIN_FILENO; } else { fd_local = bb_xopen(local_path, O_RDONLY); fstat(fd_local, &sbuf); diff --git a/networking/nc.c b/networking/nc.c index 9a353c94f..3099763b1 100644 --- a/networking/nc.c +++ b/networking/nc.c @@ -79,7 +79,7 @@ int nc_main(int argc, char **argv) #ifdef GAPING_SECURITY_HOLE if (pr00gie) { /* won't need stdin */ - close (fileno(stdin)); + close (STDIN_FILENO); } #endif /* GAPING_SECURITY_HOLE */ diff --git a/networking/tftp.c b/networking/tftp.c index bd973d79a..bfa9897b9 100644 --- a/networking/tftp.c +++ b/networking/tftp.c @@ -576,7 +576,7 @@ int tftp_main(int argc, char **argv) result = tftp(cmd, host, remotefile, fd, port, blocksize); #ifdef CONFIG_FEATURE_CLEAN_UP - if (!(fd == fileno(stdout) || fd == fileno(stdin))) { + if (!(fd == STDOUT_FILENO || fd == STDIN_FILENO)) { close(fd); } #endif diff --git a/networking/wget.c b/networking/wget.c index 619c138ba..5c94c58b8 100644 --- a/networking/wget.c +++ b/networking/wget.c @@ -794,7 +794,7 @@ progressmeter(int flag) snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "%02d:%02d ETA", i / 60, i % 60); } - write(fileno(stderr), buf, strlen(buf)); + write(STDERR_FILENO, buf, strlen(buf)); if (flag == -1) { struct sigaction sa; @@ -846,7 +846,7 @@ progressmeter(int flag) * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: wget.c,v 1.71 2004/03/15 08:28:53 andersen Exp $ + * $Id: wget.c,v 1.72 2004/03/27 10:02:43 andersen Exp $ */ -- cgit v1.2.3