Fix compiler warnings.
* protocols/http2_protocol.c
(http2_handle_stream_window_update, http2_handle_connection_window_update):
A 32-bit unsigned integer shouldn't be compared < 0). The existing test
' > 0x7FFFFFFF is sufficient. In fact, since current code is reading
4 bytes and then sets the top bit to 0, the situation tested for can never
happen.
git-svn-id: https://svn.apache.org/repos/asf/serf/trunk@1748025 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/protocols/http2_protocol.c b/protocols/http2_protocol.c
index bf06a78..fd21c4e 100644
--- a/protocols/http2_protocol.c
+++ b/protocols/http2_protocol.c
@@ -1,4 +1,4 @@
-/* ====================================================================
+ /* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
@@ -634,7 +634,7 @@
stream->lr_window += value;
- if (stream->lr_window > HTTP2_WINDOW_MAX_ALLOWED || stream->lr_window < 0)
+ if (stream->lr_window > HTTP2_WINDOW_MAX_ALLOWED )
{
/* A sender MUST NOT allow a flow-control window to exceed 2^31-1
octets. If a sender receives a WINDOW_UPDATE that causes a flow-
@@ -693,7 +693,7 @@
was0 = (h2->lr_window == 0);
h2->lr_window += value;
- if (h2->lr_window > HTTP2_WINDOW_MAX_ALLOWED || h2->lr_window < 0)
+ if (h2->lr_window > HTTP2_WINDOW_MAX_ALLOWED)
{
/* A sender MUST NOT allow a flow-control window to exceed 2^31-1
octets. If a sender receives a WINDOW_UPDATE that causes a flow-