aboutsummaryrefslogtreecommitdiff
path: root/lib/http2.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-05-22 13:58:17 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-05-22 13:59:29 +0200
commit8589e1fe30773e10c50b9a65d4f96eeb8434233c (patch)
treeabd3ef9c42c4c8a84f8071933e747e46d4da35b6 /lib/http2.c
parentfab9629133025e2d9517334535908200802b5e96 (diff)
assert: avoid, use DEBUGASSERT instead!
... as it does extra checks to actually work. Reported-by: jonrumsey at github Fixes #1504
Diffstat (limited to 'lib/http2.c')
-rw-r--r--lib/http2.c4
1 files changed, 2 insertions, 2 deletions
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;