From: phk Date: Mon, 8 Oct 2007 14:12:06 +0000 (+0000) Subject: More asserts X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66957385031114286965b09237abd7b4de77eae3;p=varnish More asserts git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2092 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_center.c b/varnish-cache/bin/varnishd/cache_center.c index 3462555a..772ddc6c 100644 --- a/varnish-cache/bin/varnishd/cache_center.c +++ b/varnish-cache/bin/varnishd/cache_center.c @@ -789,6 +789,7 @@ CNT_Session(struct sess *sp) CHECK_OBJ_NOTNULL(w, WORKER_MAGIC); for (done = 0; !done; ) { + assert(sp->wrk == w); /* * This is a good place to be paranoid about the various * pointers still pointing to the things we expect. diff --git a/varnish-cache/bin/varnishd/cache_httpconn.c b/varnish-cache/bin/varnishd/cache_httpconn.c index ce6d8af4..8ed70c9f 100644 --- a/varnish-cache/bin/varnishd/cache_httpconn.c +++ b/varnish-cache/bin/varnishd/cache_httpconn.c @@ -138,6 +138,7 @@ HTC_Rx(struct http_conn *htc) int i; CHECK_OBJ_NOTNULL(htc, HTTP_CONN_MAGIC); + AN(htc->ws->r); i = (htc->ws->r - htc->rxbuf.e) - 1; /* space for NUL */ if (i <= 0) { WS_ReleaseP(htc->ws, htc->rxbuf.b);