aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-10-17 11:18:49 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-10-17 11:18:49 +0000
commit9e23767ef59e3b84fe621adc4f30854dd03142d1 (patch)
treee6053ec781662ab4d95e4e30da162d57624ab922 /networking
parent0de37e10ed73cb18def0edf751e4b333d20568c9 (diff)
downloadbusybox-9e23767ef59e3b84fe621adc4f30854dd03142d1.tar.gz
telnetd: trivial optimization
Diffstat (limited to 'networking')
-rw-r--r--networking/telnetd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/networking/telnetd.c b/networking/telnetd.c
index 7b799dcf8..1ca6fdece 100644
--- a/networking/telnetd.c
+++ b/networking/telnetd.c
@@ -228,10 +228,11 @@ make_new_session(
#if ENABLE_FEATURE_TELNETD_STANDALONE
ts->sockfd_read = sock;
ndelay_on(sock);
- if (!sock) /* We are called with fd 0 - we are in inetd mode */
- sock++;
+ if (!sock) { /* We are called with fd 0 - we are in inetd mode */
+ sock++; /* so use fd 1 for output */
+ ndelay_on(sock);
+ }
ts->sockfd_write = sock;
- ndelay_on(sock);
if (sock > maxfd)
maxfd = sock;
#else