nc: remove unnecessary "errno = 0"

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2013-07-29 14:18:32 +02:00
parent 2ead5316b4
commit 05965cbb75

View File

@ -613,7 +613,6 @@ static int readwrite(void)
while (fds_open) { while (fds_open) {
unsigned wretry = 8200; /* net-write sanity counter */ unsigned wretry = 8200; /* net-write sanity counter */
errno = 0; /* clear from sleep, close, whatever */
ding2 = ding1; /* FD_COPY ain't portable... */ ding2 = ding1; /* FD_COPY ain't portable... */
/* some systems, notably linux, crap into their select timers on return, so /* some systems, notably linux, crap into their select timers on return, so
we create a expendable copy and give *that* to select. */ we create a expendable copy and give *that* to select. */
@ -696,7 +695,7 @@ Debug("got %d from the net, errno %d", rr, errno);
if (rr > 0) { if (rr > 0) {
if (o_ofile) /* log the stdout */ if (o_ofile) /* log the stdout */
oprint('<', (unsigned char *)np, rr); oprint('<', (unsigned char *)np, rr);
np += rr; /* fix up ptrs and whatnot */ np += rr;
rnleft -= rr; rnleft -= rr;
wrote_out += rr; /* global count */ wrote_out += rr; /* global count */
} }
@ -730,7 +729,7 @@ Debug("wrote %d to net, errno %d", rr, errno);
} }
goto shovel; goto shovel;
} }
} /* while ding1:netfd is open */ } /* while (fds_open) */
/* XXX: maybe want a more graceful shutdown() here, or screw around with /* XXX: maybe want a more graceful shutdown() here, or screw around with
linger times?? I suspect that I don't need to since I'm always doing linger times?? I suspect that I don't need to since I'm always doing