summaryrefslogtreecommitdiff
path: root/networking/telnet.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2008-05-19 09:48:17 +0000
committerBernhard Reutner-Fischer2008-05-19 09:48:17 +0000
commit5e25ddb7d369b6785ec3aaa96cbc0521c22aeb0d (patch)
tree44b7cf5fb706b0816dd4525782ca8c37d07c2f43 /networking/telnet.c
parent636a1f85e89432601c59cdc3239fc867b4adf051 (diff)
downloadbusybox-5e25ddb7d369b6785ec3aaa96cbc0521c22aeb0d.zip
busybox-5e25ddb7d369b6785ec3aaa96cbc0521c22aeb0d.tar.gz
- use STD*_FILENO some more. No object-code changes
Diffstat (limited to 'networking/telnet.c')
-rw-r--r--networking/telnet.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/networking/telnet.c b/networking/telnet.c
index b357e69..3a06c16 100644
--- a/networking/telnet.c
+++ b/networking/telnet.c
@@ -121,7 +121,7 @@ static void conescape(void)
" z suspend telnet\r\n"
" e exit telnet\r\n");
- if (read(0, &b, 1) <= 0)
+ if (read(STDIN_FILENO, &b, 1) <= 0)
doexit(EXIT_FAILURE);
switch (b) {
@@ -256,7 +256,7 @@ static void handlenetinput(int len)
}
if (len)
- write(1, G.buf, len);
+ write(STDOUT_FILENO, G.buf, len);
}
static void putiac(int c)
@@ -601,7 +601,7 @@ int telnet_main(int argc, char **argv)
ufds[0].events = ufds[1].events = POLLIN;
#else
FD_ZERO(&readfds);
- FD_SET(0, &readfds);
+ FD_SET(STDIN_FILENO, &readfds);
FD_SET(G.netfd, &readfds);
maxfd = G.netfd + 1;
#endif
@@ -629,10 +629,10 @@ int telnet_main(int argc, char **argv)
#ifdef USE_POLL
if (ufds[0].revents) /* well, should check POLLIN, but ... */
#else
- if (FD_ISSET(0, &rfds))
+ if (FD_ISSET(STDIN_FILENO, &rfds))
#endif
{
- len = read(0, G.buf, DATABUFSIZE);
+ len = read(STDIN_FILENO, G.buf, DATABUFSIZE);
if (len <= 0)
doexit(EXIT_SUCCESS);
TRACE(0, ("Read con: %d\n", len));