summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2008-06-15 01:38:27 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2008-06-15 01:38:27 +0000
commita0b338dd0c026399accccc40faef222f5032bc43 (patch)
treefba368699ed28c0a5bccb9afac7046f9741f421f /usr.bin
parent1334befa560513cf09f2d79f2f2ee8b1ea052e31 (diff)
turd polishing (useless chatter removed), ok djm
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tcpbench/tcpbench.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/tcpbench/tcpbench.c b/usr.bin/tcpbench/tcpbench.c
index dbe833b11b3..ccd76896cac 100644
--- a/usr.bin/tcpbench/tcpbench.c
+++ b/usr.bin/tcpbench/tcpbench.c
@@ -627,7 +627,7 @@ clientloop(kvm_t *kvmh, u_long ktcbtab, const char *host, const char *port,
struct pollfd *pfd;
ssize_t n;
struct statctx sc;
- u_int i;
+ u_int i, scnt = 0;
const char *errstr;
if ((buf = malloc(Bflag)) == NULL)
@@ -650,7 +650,7 @@ clientloop(kvm_t *kvmh, u_long ktcbtab, const char *host, const char *port,
for (sock = -1, ai = aitop; ai != NULL; ai = ai->ai_next) {
saddr_ntop(ai->ai_addr, ai->ai_addrlen, tmp,
sizeof(tmp));
- if (vflag)
+ if (vflag && scnt == 0)
fprintf(stderr, "Trying %s\n", tmp);
if ((sock = socket(ai->ai_family, ai->ai_socktype,
ai->ai_protocol)) == -1) {
@@ -688,8 +688,11 @@ clientloop(kvm_t *kvmh, u_long ktcbtab, const char *host, const char *port,
pfd[i].fd = sock;
pfd[i].events = POLLOUT;
+ scnt++;
}
+ if (vflag && scnt > 1)
+ fprintf(stderr, "%u connections established\n", scnt);
arc4random_buf(buf, Bflag);
signal(SIGINT, exitsighand);