telnetd: trivial optimization
This commit is contained in:
parent
0de37e10ed
commit
9e23767ef5
@ -228,10 +228,11 @@ make_new_session(
|
|||||||
#if ENABLE_FEATURE_TELNETD_STANDALONE
|
#if ENABLE_FEATURE_TELNETD_STANDALONE
|
||||||
ts->sockfd_read = sock;
|
ts->sockfd_read = sock;
|
||||||
ndelay_on(sock);
|
ndelay_on(sock);
|
||||||
if (!sock) /* We are called with fd 0 - we are in inetd mode */
|
if (!sock) { /* We are called with fd 0 - we are in inetd mode */
|
||||||
sock++;
|
sock++; /* so use fd 1 for output */
|
||||||
|
ndelay_on(sock);
|
||||||
|
}
|
||||||
ts->sockfd_write = sock;
|
ts->sockfd_write = sock;
|
||||||
ndelay_on(sock);
|
|
||||||
if (sock > maxfd)
|
if (sock > maxfd)
|
||||||
maxfd = sock;
|
maxfd = sock;
|
||||||
#else
|
#else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user