summaryrefslogtreecommitdiffhomepage
path: root/networking
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-07-29 14:18:32 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2013-07-29 14:18:32 +0200
commit05965cbb7587f6ba06687a94d040d0ae5933d28a (patch)
tree1b554f4075c6b0b07df93e43f1f33a30667152b0 /networking
parent2ead5316b48ce85db483d9d6f3f4a59c9f38fe21 (diff)
nc: remove unnecessary "errno = 0"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r--networking/nc_bloaty.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/networking/nc_bloaty.c b/networking/nc_bloaty.c
index 04baf0316..b9eff3da4 100644
--- a/networking/nc_bloaty.c
+++ b/networking/nc_bloaty.c
@@ -613,7 +613,6 @@ static int readwrite(void)
while (fds_open) {
unsigned wretry = 8200; /* net-write sanity counter */
- errno = 0; /* clear from sleep, close, whatever */
ding2 = ding1; /* FD_COPY ain't portable... */
/* some systems, notably linux, crap into their select timers on return, so
we create a expendable copy and give *that* to select. */
@@ -696,9 +695,9 @@ Debug("got %d from the net, errno %d", rr, errno);
if (rr > 0) {
if (o_ofile) /* log the stdout */
oprint('<', (unsigned char *)np, rr);
- np += rr; /* fix up ptrs and whatnot */
+ np += rr;
rnleft -= rr;
- wrote_out += rr; /* global count */
+ wrote_out += rr; /* global count */
}
Debug("wrote %d to stdout, errno %d", rr, errno);
} /* rnleft */
@@ -713,7 +712,7 @@ Debug("wrote %d to stdout, errno %d", rr, errno);
oprint('>', (unsigned char *)zp, rr);
zp += rr;
rzleft -= rr;
- wrote_net += rr; /* global count */
+ wrote_net += rr; /* global count */
}
Debug("wrote %d to net, errno %d", rr, errno);
} /* rzleft */
@@ -730,7 +729,7 @@ Debug("wrote %d to net, errno %d", rr, errno);
}
goto shovel;
}
- } /* while ding1:netfd is open */
+ } /* while (fds_open) */
/* 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