[6.0] 76abfa750 Clarify things for Coverity

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Thu Aug 16 08:52:41 UTC 2018


commit 76abfa7507b504d21641540135c817dd92b2d8b1
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Thu Apr 12 08:07:00 2018 +0000

    Clarify things for Coverity

diff --git a/bin/varnishtest/vtc_haproxy.c b/bin/varnishtest/vtc_haproxy.c
index 73f42b879..663a363b1 100644
--- a/bin/varnishtest/vtc_haproxy.c
+++ b/bin/varnishtest/vtc_haproxy.c
@@ -388,6 +388,7 @@ haproxy_build_backends(const struct haproxy *h, const char *vsb_data)
 		if (err != NULL)
 			vtc_fatal(h->vl,
 			    "Create listen socket failed: %s", err);
+		assert(sock > 0);
 
 		VTCP_myname(sock, addr, sizeof addr, port, sizeof port);
 		bprintf(buf, "%s_%s", h->name, p);


More information about the varnish-commit mailing list