aboutsummaryrefslogtreecommitdiff
path: root/lib/http2.c
diff options
context:
space:
mode:
authorJay Satiro <raysatiro@yahoo.com>2016-04-12 00:37:44 -0400
committerJay Satiro <raysatiro@yahoo.com>2016-04-12 00:37:44 -0400
commit3f57880ad10d3c98891266766c4423d938ee1821 (patch)
tree1f3bc59d1ac3a2a3ec3b794fa72595a7201fa6c3 /lib/http2.c
parent723f90119512fa29b8b407d296e01219c4ead04f (diff)
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
Diffstat (limited to 'lib/http2.c')
-rw-r--r--lib/http2.c2
1 files changed, 2 insertions, 0 deletions
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 */
}