Commit 4fa003a3 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

More asserts


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2092 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 891a628e
......@@ -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.
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment