From 3f57880ad10d3c98891266766c4423d938ee1821 Mon Sep 17 00:00:00 2001 From: Jay Satiro Date: Tue, 12 Apr 2016 00:37:44 -0400 Subject: http2: Use size_t type for data drain count Ref: https://github.com/curl/curl/issues/659 Ref: https://github.com/curl/curl/pull/663 --- lib/http2.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/http2.c') diff --git a/lib/http2.c b/lib/http2.c index 1f4c6ffcc..eae8dac8d 100644 --- a/lib/http2.c +++ b/lib/http2.c @@ -1166,6 +1166,7 @@ static ssize_t http2_handle_stream_close(struct connectdata *conn, httpc->pause_stream_id = 0; } + DEBUGASSERT(httpc->drain_total >= data->state.drain); httpc->drain_total -= data->state.drain; data->state.drain = 0; @@ -1471,6 +1472,7 @@ static ssize_t http2_recv(struct connectdata *conn, int sockindex, stream->stream_id)); } else if(!stream->closed) { + DEBUGASSERT(httpc->drain_total >= data->state.drain); httpc->drain_total -= data->state.drain; data->state.drain = 0; /* this stream is hereby drained */ } -- cgit v1.2.3