From 8645d09fafa599bb3d2dcdcce93b955dc499918f Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 19 Jan 2009 09:22:49 +0000 Subject: [PATCH] A couple of FlexeLint nits git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3523 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_ban.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache_ban.c b/varnish-cache/bin/varnishd/cache_ban.c index 0ce7cb7e..64ea9a38 100644 --- a/varnish-cache/bin/varnishd/cache_ban.c +++ b/varnish-cache/bin/varnishd/cache_ban.c @@ -242,7 +242,7 @@ ban_cond_req_http(const struct ban_test *bt, const struct object *o, (void)o; 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)); } @@ -254,7 +254,7 @@ ban_cond_obj_http(const struct ban_test *bt, const struct object *o, (void)sp; 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)); } @@ -288,9 +288,10 @@ ban_parse_http(struct ban_test *bt, const char *a1) int l; l = strlen(a1); + assert(l < 127); bt->src = malloc(l + 3); XXXAN(bt->src); - bt->src[0] = l + 1; + bt->src[0] = (char)l + 1; memcpy(bt->src + 1, a1, l); bt->src[l + 1] = ':'; bt->src[l + 2] = '\0'; -- 2.39.5