From 98d23ec1411fe10609af64a5148bd98b868220e7 Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 28 Jun 2006 21:38:20 +0000 Subject: [PATCH] Convince flexelint that we know what we do with some asserts git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@264 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_fetch.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/varnish-cache/bin/varnishd/cache_fetch.c b/varnish-cache/bin/varnishd/cache_fetch.c index ed55ec46..4aa1de52 100644 --- a/varnish-cache/bin/varnishd/cache_fetch.c +++ b/varnish-cache/bin/varnishd/cache_fetch.c @@ -200,6 +200,7 @@ fetch_eof(struct worker *w, struct sess *sp, int fd, struct http *hp) p = NULL; v = 0; + st = NULL; while (1) { if (v == 0) { st = stevedore->alloc(stevedore, CHUNK_PREALLOC); @@ -207,6 +208,8 @@ fetch_eof(struct worker *w, struct sess *sp, int fd, struct http *hp) 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 @@ FetchSession(struct worker *w, struct sess *sp) body = 0; break; default: + body = 0; break; } -- 2.39.5