From: Ruediger Pluem <rpluem@apache.org>
Date: Thu, 25 Aug 2011 14:35:16 +0000 (+0000)
Subject: * The first condition is not needed as pos >=0. If the first one is true
X-Git-Tag: 2.3.15~359
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c02dc3ea8241d00c40c8ee334d1ab277dd00819a;p=apache

* The first condition is not needed as pos >=0. If the first one is true
  the second one is true either. If the second one is false the first one is
  false as well.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1161578 13f79535-47bb-0310-9956-ffa450edef68
---

diff --git a/modules/http/byterange_filter.c b/modules/http/byterange_filter.c
index c691644164..f55e4cc49f 100644
--- a/modules/http/byterange_filter.c
+++ b/modules/http/byterange_filter.c
@@ -172,11 +172,11 @@ static apr_status_t copy_brigade_range(apr_bucket_brigade *bb,
         /* we know that no bucket has undefined length (-1) */
         AP_DEBUG_ASSERT(e->length != (apr_size_t)(-1));
         elen64 = (apr_uint64_t)e->length;
-        if (!first && (elen64 > start64 || elen64 + pos > start64)) {
+        if (!first && (elen64 + pos > start64)) {
             first = e;
             off_first = pos;
         }
-        if (!last && (elen64 >= end64 || elen64 + pos >= end64)) {
+        if (!last && (elen64 + pos >= end64)) {
             last = e;
             off_last = pos;
             break;