r850 - trunk/varnish-cache/lib/libvarnish

phk at projects.linpro.no phk at projects.linpro.no
Sun Aug 20 17:11:34 CEST 2006


Author: phk
Date: 2006-08-20 17:11:34 +0200 (Sun, 20 Aug 2006)
New Revision: 850

Modified:
   trunk/varnish-cache/lib/libvarnish/cli_common.c
Log:
Assert that the cli status is valid


Modified: trunk/varnish-cache/lib/libvarnish/cli_common.c
===================================================================
--- trunk/varnish-cache/lib/libvarnish/cli_common.c	2006-08-20 14:53:26 UTC (rev 849)
+++ trunk/varnish-cache/lib/libvarnish/cli_common.c	2006-08-20 15:11:34 UTC (rev 850)
@@ -58,6 +58,8 @@
 					 * any misformats by snprintf
 					 */
 
+	assert(cli->result >= 100);
+	assert(cli->result <= 999);
 	i = snprintf(res, sizeof res,
 	    "%-3d %-8d\n", cli->result, vsb_len(cli->sb));
 	assert(i == CLI_LINE0_LEN);




More information about the varnish-commit mailing list