Commit 88b3fe12 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

A couple of FlexeLint nits



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3523 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent d7cb5827
...@@ -242,7 +242,7 @@ ban_cond_req_http(const struct ban_test *bt, const struct object *o, ...@@ -242,7 +242,7 @@ ban_cond_req_http(const struct ban_test *bt, const struct object *o,
(void)o; (void)o;
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
http_GetHdr(sp->http, bt->src, &s); (void)http_GetHdr(sp->http, bt->src, &s);
return (ban_cond_str(bt, s)); return (ban_cond_str(bt, s));
} }
...@@ -254,7 +254,7 @@ ban_cond_obj_http(const struct ban_test *bt, const struct object *o, ...@@ -254,7 +254,7 @@ ban_cond_obj_http(const struct ban_test *bt, const struct object *o,
(void)sp; (void)sp;
CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC); CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC);
http_GetHdr(o->http, bt->src, &s); (void)http_GetHdr(o->http, bt->src, &s);
return (ban_cond_str(bt, s)); return (ban_cond_str(bt, s));
} }
...@@ -288,9 +288,10 @@ ban_parse_http(struct ban_test *bt, const char *a1) ...@@ -288,9 +288,10 @@ ban_parse_http(struct ban_test *bt, const char *a1)
int l; int l;
l = strlen(a1); l = strlen(a1);
assert(l < 127);
bt->src = malloc(l + 3); bt->src = malloc(l + 3);
XXXAN(bt->src); XXXAN(bt->src);
bt->src[0] = l + 1; bt->src[0] = (char)l + 1;
memcpy(bt->src + 1, a1, l); memcpy(bt->src + 1, a1, l);
bt->src[l + 1] = ':'; bt->src[l + 1] = ':';
bt->src[l + 2] = '\0'; bt->src[l + 2] = '\0';
......
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