[master] 0bec737 An assert to explain stuff to Coverity

Poul-Henning Kamp phk at FreeBSD.org
Thu Mar 12 10:04:09 CET 2015


commit 0bec737bbb4cfd36c6dc5d84f94ceb3e603b6240
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Thu Mar 12 09:02:26 2015 +0000

    An assert to explain stuff to Coverity

diff --git a/bin/varnishd/mgt/mgt_cli.c b/bin/varnishd/mgt/mgt_cli.c
index 3920468..7f754e1 100644
--- a/bin/varnishd/mgt/mgt_cli.c
+++ b/bin/varnishd/mgt/mgt_cli.c
@@ -525,6 +525,7 @@ mct_callback(void *priv, const struct suckaddr *sa)
 	VJ_master(JAIL_MASTER_HIGH);
 	sock = VTCP_listen(sa, 10, &err);
 	VJ_master(JAIL_MASTER_LOW);
+	assert(sock != 0);		// We know where stdin is
 	if (sock > 0) {
 		VTCP_myname(sock, abuf, sizeof abuf, pbuf, sizeof pbuf);
 		VSB_printf(vsb, "%s %s\n", abuf, pbuf);



More information about the varnish-commit mailing list