summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2008-06-15 01:38:26 +0000
committerhenning <henning@openbsd.org>2008-06-15 01:38:26 +0000
commit92c4547005c796ec381c3a0107e1e18563f4c24e (patch)
tree0f5660318a2fab90e07e605e6aa7a6fbfe054403
parentthis should be a MD include file; discussed with matthieu (diff)
downloadwireguard-openbsd-92c4547005c796ec381c3a0107e1e18563f4c24e.tar.xz
wireguard-openbsd-92c4547005c796ec381c3a0107e1e18563f4c24e.zip
turd polishing (useless chatter removed), ok djm
-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);