[master] 72c46cdcf No return value from VTCP_[non]blocking() to throw away

Poul-Henning Kamp phk at FreeBSD.org
Wed Jan 16 22:56:06 UTC 2019


commit 72c46cdcf72da369c742f012f12f9a10f37058dc
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Jan 16 21:57:34 2019 +0000

    No return value from VTCP_[non]blocking() to throw away

diff --git a/bin/varnishd/cache/cache_acceptor.c b/bin/varnishd/cache/cache_acceptor.c
index f47bd57e0..f80d4b2f4 100644
--- a/bin/varnishd/cache/cache_acceptor.c
+++ b/bin/varnishd/cache/cache_acceptor.c
@@ -380,7 +380,7 @@ vca_make_session(struct worker *wrk, void *arg)
 		 * to send an intelligent message back.
 		 */
 		vca_pace_bad();
-		(void)VTCP_nonblocking(wa->acceptsock);
+		VTCP_nonblocking(wa->acceptsock);
 		closefd(&wa->acceptsock);
 		wrk->stats->sess_drop++;
 		WS_Release(wrk->aws, 0);
diff --git a/bin/varnishd/http1/cache_http1_fetch.c b/bin/varnishd/http1/cache_http1_fetch.c
index d8318b444..c5ccee3b0 100644
--- a/bin/varnishd/http1/cache_http1_fetch.c
+++ b/bin/varnishd/http1/cache_http1_fetch.c
@@ -97,7 +97,7 @@ V1F_SendReq(struct worker *wrk, struct busyobj *bo, uint64_t *ctr_hdrbytes,
 
 	VSLb(bo->vsl, SLT_BackendStart, "%s %s", abuf, pbuf);
 
-	(void)VTCP_blocking(*htc->rfd);	/* XXX: we should timeout instead */
+	VTCP_blocking(*htc->rfd);	/* XXX: we should timeout instead */
 	V1L_Open(wrk, wrk->aws, htc->rfd, bo->vsl, bo->t_prev, 0);
 	hdrbytes = HTTP1_Write(wrk, hp, HTTP1_Req);
 
diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index 8269d0fb1..5b6ce30c0 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -1076,7 +1076,7 @@ h2_rxframe(struct worker *wrk, struct h2_sess *h2)
 	char b[8];
 
 	ASSERT_RXTHR(h2);
-	(void)VTCP_blocking(*h2->htc->rfd);
+	VTCP_blocking(*h2->htc->rfd);
 	h2->sess->t_idle = VTIM_real();
 	hs = HTC_RxStuff(h2->htc, h2_frame_complete,
 	    NULL, NULL, NAN,
diff --git a/bin/varnishtest/vtc_barrier.c b/bin/varnishtest/vtc_barrier.c
index 7a7ac31f5..e7fc1e5ae 100644
--- a/bin/varnishtest/vtc_barrier.c
+++ b/bin/varnishtest/vtc_barrier.c
@@ -146,7 +146,7 @@ barrier_sock_thread(void *priv)
 		    b->name, err, strerror(errno), errno);
 	}
 	assert(sock > 0);
-	(void)VTCP_nonblocking(sock);
+	VTCP_nonblocking(sock);
 	VTCP_myname(sock, abuf, sizeof abuf, pbuf, sizeof pbuf);
 
 	macro_def(vl, b->name, "addr", "%s", abuf);
diff --git a/bin/varnishtest/vtc_client.c b/bin/varnishtest/vtc_client.c
index 6966e462b..72b7cfb71 100644
--- a/bin/varnishtest/vtc_client.c
+++ b/bin/varnishtest/vtc_client.c
@@ -148,7 +148,7 @@ uds_open(void *priv, const struct sockaddr_un *uds)
 	if (s < 0)
 		return (s);
 
-	(void) VTCP_nonblocking(s);
+	VTCP_nonblocking(s);
 	i = connect(s, (const void*)uds, sl);
 	if (i == 0)
 		return(s);
@@ -229,7 +229,7 @@ client_thread(void *priv)
 			vtc_fatal(c->vl, "Failed to open %s: %s",
 			    VSB_data(vsb), err);
 		/* VTCP_blocking does its own checks, trust it */
-		(void)VTCP_blocking(fd);
+		VTCP_blocking(fd);
 		if (c->proxy_spec != NULL)
 			client_proxy(vl, fd, c->proxy_version, c->proxy_spec);
 		if (! c->keepalive)
diff --git a/bin/varnishtest/vtc_haproxy.c b/bin/varnishtest/vtc_haproxy.c
index 2a52de427..2fee33b30 100644
--- a/bin/varnishtest/vtc_haproxy.c
+++ b/bin/varnishtest/vtc_haproxy.c
@@ -300,7 +300,7 @@ haproxy_cli_thread(void *priv)
 	if (fd < 0)
 		vtc_fatal(hc->vl,
 		    "CLI failed to open %s: %s", VSB_data(vsb), err);
-	(void)VTCP_blocking(fd);
+	VTCP_blocking(fd);
 	hc->sock = fd;
 	parse_string(hc->spec, haproxy_cli_cmds, hc, hc->vl);
 	vtc_log(hc->vl, 2, "CLI ending");
diff --git a/bin/varnishtest/vtc_subr.c b/bin/varnishtest/vtc_subr.c
index 0e5922978..ffcc51ef7 100644
--- a/bin/varnishtest/vtc_subr.c
+++ b/bin/varnishtest/vtc_subr.c
@@ -192,7 +192,7 @@ vtc_record(struct vtclog *vl, int fd, struct vsb *vsb)
 	struct pollfd fds[1];
 	int i;
 
-	(void)VTCP_nonblocking(fd);
+	VTCP_nonblocking(fd);
 	while (1) {
 		memset(fds, 0, sizeof fds);
 		fds->fd = fd;
diff --git a/lib/libvarnish/vtcp.c b/lib/libvarnish/vtcp.c
index 6ee32f809..baf61f27e 100644
--- a/lib/libvarnish/vtcp.c
+++ b/lib/libvarnish/vtcp.c
@@ -264,7 +264,7 @@ VTCP_connected(int s)
 		return (-1);
 	}
 
-	(void)VTCP_blocking(s);
+	VTCP_blocking(s);
 	return (s);
 }
 
@@ -291,7 +291,7 @@ VTCP_connect(const struct suckaddr *name, int msec)
 
 	/* Set the socket non-blocking */
 	if (msec != 0)
-		(void)VTCP_nonblocking(s);
+		VTCP_nonblocking(s);
 
 	val = 1;
 	AZ(setsockopt(s, IPPROTO_TCP, TCP_NODELAY, &val, sizeof val));
diff --git a/lib/libvarnish/vus.c b/lib/libvarnish/vus.c
index ba8a3d507..12ee9af31 100644
--- a/lib/libvarnish/vus.c
+++ b/lib/libvarnish/vus.c
@@ -118,7 +118,7 @@ VUS_connect(const char *path, int msec)
 
 	/* Set the socket non-blocking */
 	if (msec != 0)
-		(void)VTCP_nonblocking(s);
+		VTCP_nonblocking(s);
 
 	i = connect(s, (const void*)&uds, sl);
 	if (i == 0)


More information about the varnish-commit mailing list