r264 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Wed Jun 28 23:38:20 CEST 2006


Author: phk
Date: 2006-06-28 23:38:20 +0200 (Wed, 28 Jun 2006)
New Revision: 264

Modified:
   trunk/varnish-cache/bin/varnishd/cache_fetch.c
Log:
Convince flexelint that we know what we do with some asserts


Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_fetch.c	2006-06-28 21:33:06 UTC (rev 263)
+++ trunk/varnish-cache/bin/varnishd/cache_fetch.c	2006-06-28 21:38:20 UTC (rev 264)
@@ -200,6 +200,7 @@
 
 	p = NULL;
 	v = 0;
+	st = NULL;
 	while (1) {
 		if (v == 0) {
 			st = stevedore->alloc(stevedore, CHUNK_PREALLOC);
@@ -207,6 +208,8 @@
 			p = st->ptr + st->len;
 			v = st->space - st->len;
 		}
+		assert(p != NULL);
+		assert(st != NULL);
 		if (http_GetTail(hp, v, &b, &e)) {
 			memcpy(p, b, e - b);
 			p += e - b;
@@ -278,6 +281,7 @@
 		body = 0;
 		break;
 	default:
+		body = 0;
 		break;
 	}
 




More information about the varnish-commit mailing list