[4.1] d2c30cc Check pthread_cond_signal returns

PÃ¥l Hermunn Johansen hermunn at varnish-software.com
Mon Sep 12 15:48:17 CEST 2016


commit d2c30cce453277e9226ee24faf47f894f09ebeaa
Author: Guillaume Quintard <guillaume at varnish-software.com>
Date:   Tue Aug 30 10:43:32 2016 +0200

    Check pthread_cond_signal returns

diff --git a/bin/varnishtest/vtc_barrier.c b/bin/varnishtest/vtc_barrier.c
index 39b6be6..eb15fe8 100644
--- a/bin/varnishtest/vtc_barrier.c
+++ b/bin/varnishtest/vtc_barrier.c
@@ -146,7 +146,7 @@ barrier_sock_thread(void *priv)
 
 	sock = VTCP_listen_on("127.0.0.1:0", NULL, b->expected, &err);
 	if (sock < 0) {
-		pthread_cond_signal(&b->cond);
+		AZ(pthread_cond_signal(&b->cond));
 		AZ(pthread_mutex_unlock(&b->mtx));
 		vtc_log(vl, 0, "Barrier(%s) %s fails: %s (errno=%d)",
 		    b->name, err, strerror(errno), errno);
@@ -159,7 +159,7 @@ barrier_sock_thread(void *priv)
 	macro_def(vl, b->name, "port", "%s", pbuf);
 	macro_def(vl, b->name, "sock", "%s:%s", abuf, pbuf);
 
-	pthread_cond_signal(&b->cond);
+	AZ(pthread_cond_signal(&b->cond));
 	AZ(pthread_mutex_unlock(&b->mtx));
 
 	conns = calloc(b->expected, sizeof *conns);



More information about the varnish-commit mailing list