From 8589e1fe30773e10c50b9a65d4f96eeb8434233c Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 22 May 2017 13:58:17 +0200 Subject: assert: avoid, use DEBUGASSERT instead! ... as it does extra checks to actually work. Reported-by: jonrumsey at github Fixes #1504 --- lib/http2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/http2.c') diff --git a/lib/http2.c b/lib/http2.c index c65305029..e123bc56c 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -784,7 +784,7 @@ static int on_begin_headers(nghttp2_session *session, /* This is trailer HEADERS started. Allocate buffer for them. */ DEBUGF(infof(data_s, "trailer field started\n")); - assert(stream->trailer_recvbuf == NULL); + DEBUGASSERT(stream->trailer_recvbuf == NULL); stream->trailer_recvbuf = Curl_add_buffer_init(); if(!stream->trailer_recvbuf) { @@ -1453,7 +1453,7 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex, infof(data, "%zu data bytes written\n", nread); if(stream->pauselen == 0) { DEBUGF(infof(data, "Unpaused by stream %u\n", stream->stream_id)); - assert(httpc->pause_stream_id == stream->stream_id); + DEBUGASSERT(httpc->pause_stream_id == stream->stream_id); httpc->pause_stream_id = 0; stream->pausedata = NULL; -- cgit v1.2.3