summaryrefslogtreecommitdiffstats
path: root/usr.bin/tcpbench
diff options
context:
space:
mode:
authorhaesbaert <haesbaert@openbsd.org>2011-12-04 06:37:51 +0000
committerhaesbaert <haesbaert@openbsd.org>2011-12-04 06:37:51 +0000
commit146e95956e93338d98d42c00c9a99ca8e1406bc1 (patch)
tree69af93d8c2f05d3b6f1e1e8559b6a4418332de4b /usr.bin/tcpbench
parentCleanup recently removed flags from ifconfig.c and its manpage. (diff)
downloadwireguard-openbsd-146e95956e93338d98d42c00c9a99ca8e1406bc1.tar.xz
wireguard-openbsd-146e95956e93338d98d42c00c9a99ca8e1406bc1.zip
Fix some warnx() calls which should be fprintf plus KNF.
Diffstat (limited to 'usr.bin/tcpbench')
-rw-r--r--usr.bin/tcpbench/tcpbench.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/tcpbench/tcpbench.c b/usr.bin/tcpbench/tcpbench.c
index d8d213e44bb..8e098023cf9 100644
--- a/usr.bin/tcpbench/tcpbench.c
+++ b/usr.bin/tcpbench/tcpbench.c
@@ -330,8 +330,7 @@ retry:
if (nretry--) {
warnx("pcb prev pointer insane");
goto retry;
- }
- else
+ } else
errx(1, "pcb prev pointer insane,"
" all attempts exausted");
}
@@ -705,7 +704,8 @@ again:
mainstats.nconns++;
set_slice_timer(mainstats.nconns > 0);
if (ptb->vflag)
- warnx("Accepted connection from %s, fd = %d\n", tmp, sc->fd);
+ fprintf(stderr, "Accepted connection from %s, fd = %d\n",
+ tmp, sc->fd);
}
static void
@@ -810,11 +810,11 @@ again:
err(1, "write");
}
if (TCP_MODE && n == 0) {
- warnx("Remote end closed connection");
+ fprintf(stderr, "Remote end closed connection");
exit(1);
}
if (ptb->vflag >= 3)
- warnx("write: %zd bytes\n", n);
+ fprintf(stderr, "write: %zd bytes\n", n);
sc->bytes += n;
mainstats.slice_bytes += n;
if (UDP_MODE)