r3523 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Mon Jan 19 10:22:49 CET 2009


Author: phk
Date: 2009-01-19 10:22:49 +0100 (Mon, 19 Jan 2009)
New Revision: 3523

Modified:
   trunk/varnish-cache/bin/varnishd/cache_ban.c
Log:
A couple of FlexeLint nits



Modified: trunk/varnish-cache/bin/varnishd/cache_ban.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_ban.c	2009-01-18 16:57:29 UTC (rev 3522)
+++ trunk/varnish-cache/bin/varnishd/cache_ban.c	2009-01-19 09:22:49 UTC (rev 3523)
@@ -242,7 +242,7 @@
 
 	(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 @@
 
 	(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 @@
 	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';



More information about the varnish-commit mailing list