r4906 - in trunk/varnish-cache/bin: . varnishtest

phk at varnish-cache.org phk at varnish-cache.org
Sat Jun 5 16:33:07 CEST 2010


Author: phk
Date: 2010-06-05 16:33:07 +0200 (Sat, 05 Jun 2010)
New Revision: 4906

Modified:
   trunk/varnish-cache/bin/flint.lnt
   trunk/varnish-cache/bin/varnishtest/vtc.c
   trunk/varnish-cache/bin/varnishtest/vtc_http.c
   trunk/varnish-cache/bin/varnishtest/vtc_log.c
   trunk/varnish-cache/bin/varnishtest/vtc_varnish.c
Log:
Flexelint polishing



Modified: trunk/varnish-cache/bin/flint.lnt
===================================================================
--- trunk/varnish-cache/bin/flint.lnt	2010-06-05 14:24:04 UTC (rev 4905)
+++ trunk/varnish-cache/bin/flint.lnt	2010-06-05 14:33:07 UTC (rev 4906)
@@ -12,6 +12,7 @@
 -esym(528, svnid)		// Sym not ref
 
 -efile(451, shmlog_tags.h)	// No include guard
+-efile(451, stat_field.h)	// No include guard
 
 ///////////////////////////////////////////////////////////////////////
 // assert() support, common to libvarnish and libvarnishapi

Modified: trunk/varnish-cache/bin/varnishtest/vtc.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc.c	2010-06-05 14:24:04 UTC (rev 4905)
+++ trunk/varnish-cache/bin/varnishtest/vtc.c	2010-06-05 14:33:07 UTC (rev 4906)
@@ -175,6 +175,7 @@
 		*q = '\0';
 		m = macro_get(p);
 		if (m == NULL) {
+			vsb_delete(vsb);
 			vtc_log(vl, 0, "Macro ${%s} not found", p);
 			return (NULL);
 		}

Modified: trunk/varnish-cache/bin/varnishtest/vtc_http.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_http.c	2010-06-05 14:24:04 UTC (rev 4905)
+++ trunk/varnish-cache/bin/varnishtest/vtc_http.c	2010-06-05 14:33:07 UTC (rev 4906)
@@ -870,7 +870,7 @@
 	AN(av[1]);
 	AN(av[2]);
 	AZ(av[3]);
-	n = strtod(av[1], NULL);
+	n = strtoul(av[1], NULL, 0);
 	for (m = 1 ; m <= n; m++) {
 		vtc_log(vl, 4, "Loop #%u", m);
 		s = strdup(av[2]);

Modified: trunk/varnish-cache/bin/varnishtest/vtc_log.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_log.c	2010-06-05 14:24:04 UTC (rev 4905)
+++ trunk/varnish-cache/bin/varnishtest/vtc_log.c	2010-06-05 14:33:07 UTC (rev 4906)
@@ -122,7 +122,7 @@
 #define NLEAD (sizeof(lead)/sizeof(lead[0]))
 
 static void
-vtc_log_emit(struct vtclog *vl, unsigned lvl)
+vtc_log_emit(const struct vtclog *vl, unsigned lvl)
 {
 	if (vtc_stop && lvl == 0)
 		return;

Modified: trunk/varnish-cache/bin/varnishtest/vtc_varnish.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_varnish.c	2010-06-05 14:24:04 UTC (rev 4905)
+++ trunk/varnish-cache/bin/varnishtest/vtc_varnish.c	2010-06-05 14:33:07 UTC (rev 4906)
@@ -526,6 +526,7 @@
 
 	u = varnish_ask_cli(v, vsb_data(vsb), NULL);
 	if (u != expect) {
+		vsb_delete(vsb);
 		vtc_log(v->vl, 0,
 		    "VCL compilation got %u expected %u",
 		    u, expect);
@@ -581,6 +582,8 @@
 
 	u = varnish_ask_cli(v, vsb_data(vsb), NULL);
 	if (u != CLIS_OK) {
+		vsb_delete(vsb);
+		vsb_delete(vsb2);
 		vtc_log(v->vl, 0, "FAIL VCL does not compile");
 		return;
 	}




More information about the varnish-commit mailing list