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

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Wed Jul 10 07:42:09 UTC 2019


commit db74b4c1ac4f50e3556ab90fad78f8e92264120d
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 1e56ab5f6..f5f102075 100644
--- a/bin/varnishd/cache/cache_acceptor.c
+++ b/bin/varnishd/cache/cache_acceptor.c
@@ -382,7 +382,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 2ddc58142..c937d741e 100644
--- a/bin/varnishd/http1/cache_http1_fetch.c
+++ b/bin/varnishd/http1/cache_http1_fetch.c
@@ -98,7 +98,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 7d040b7d0..194f225c5 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 7f2f0c1ce..c3238bef6 100644
--- a/bin/varnishtest/vtc_barrier.c
+++ b/bin/varnishtest/vtc_barrier.c
@@ -147,7 +147,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 d0962e5bc..ed81203a9 100644
--- a/bin/varnishtest/vtc_client.c
+++ b/bin/varnishtest/vtc_client.c
@@ -140,7 +140,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);
@@ -221,7 +221,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 f8e973701..55e986f57 100644
--- a/bin/varnishtest/vtc_haproxy.c
+++ b/bin/varnishtest/vtc_haproxy.c
@@ -303,7 +303,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 b3584a964..6f6e11eea 100644
--- a/bin/varnishtest/vtc_subr.c
+++ b/bin/varnishtest/vtc_subr.c
@@ -193,7 +193,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 759be1f64..85bac3979 100644
--- a/lib/libvarnish/vtcp.c
+++ b/lib/libvarnish/vtcp.c
@@ -265,7 +265,7 @@ VTCP_connected(int s)
 		return (-1);
 	}
 
-	(void)VTCP_blocking(s);
+	VTCP_blocking(s);
 	return (s);
 }
 
@@ -292,7 +292,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 f233c5f8f..f3c380920 100644
--- a/lib/libvarnish/vus.c
+++ b/lib/libvarnish/vus.c
@@ -119,7 +119,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