Commit 0954647f authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Flexelint polishing



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4906 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 02f416e8
......@@ -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
......
......@@ -175,6 +175,7 @@ macro_expand(struct vtclog *vl, const char *text)
*q = '\0';
m = macro_get(p);
if (m == NULL) {
vsb_delete(vsb);
vtc_log(vl, 0, "Macro ${%s} not found", p);
return (NULL);
}
......
......@@ -870,7 +870,7 @@ cmd_http_loop(CMD_ARGS)
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]);
......
......@@ -122,7 +122,7 @@ static const char * const lead[] = {
#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;
......
......@@ -526,6 +526,7 @@ varnish_vcl(struct varnish *v, const char *vcl, enum cli_status_e expect)
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 @@ varnish_vclbackend(struct varnish *v, const char *vcl)
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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment