]> granicus.if.org Git - apache/commitdiff
* The first condition is not needed as pos >=0. If the first one is true
authorRuediger Pluem <rpluem@apache.org>
Thu, 25 Aug 2011 14:35:16 +0000 (14:35 +0000)
committerRuediger Pluem <rpluem@apache.org>
Thu, 25 Aug 2011 14:35:16 +0000 (14:35 +0000)
  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

modules/http/byterange_filter.c

index c6916441643705636802cb3a12af5415ae4ffefd..f55e4cc49f65355f26546e4cfe301efc234dd929 100644 (file)
@@ -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;