]> err.no Git - varnish/commitdiff
Convince flexelint that we know what we do with some asserts
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 28 Jun 2006 21:38:20 +0000 (21:38 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Wed, 28 Jun 2006 21:38:20 +0000 (21:38 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@264 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_fetch.c

index ed55ec46a975585297af2b676c751f424b56144d..4aa1de52ea1445b61ffe7f6ee0b16f96d2e3f50f 100644 (file)
@@ -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;
        }