[master] 26d615e Fix assert to be more useful

Poul-Henning Kamp phk at FreeBSD.org
Mon Sep 5 09:09:09 CEST 2016


commit 26d615ec4d3a815cf288f18f166a9744fcf10f6c
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Sep 5 07:00:32 2016 +0000

    Fix assert to be more useful

diff --git a/bin/varnishd/http2/cache_http2_send.c b/bin/varnishd/http2/cache_http2_send.c
index 0ea2690..644b276 100644
--- a/bin/varnishd/http2/cache_http2_send.c
+++ b/bin/varnishd/http2/cache_http2_send.c
@@ -105,10 +105,10 @@ H2_Send(struct worker *wrk, struct h2_req *r2, int flush,
 
 	(void)flush;
 
-	AN(ptr);
 	CHECK_OBJ_NOTNULL(r2, H2_REQ_MAGIC);
 	h2 = r2->h2sess;
 	CHECK_OBJ_NOTNULL(h2, H2_SESS_MAGIC);
+	assert(len == 0 || ptr != NULL);
 
 	Lck_Lock(&h2->sess->mtx);
 	mfs = h2->their_settings[H2S_MAX_FRAME_SIZE];



More information about the varnish-commit mailing list