]> granicus.if.org Git - apache/commitdiff
* Bit operators should be more efficient then the modulo operator (provided the compi...
authorRuediger Pluem <rpluem@apache.org>
Mon, 29 Aug 2011 07:51:29 +0000 (07:51 +0000)
committerRuediger Pluem <rpluem@apache.org>
Mon, 29 Aug 2011 07:51:29 +0000 (07:51 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162669 13f79535-47bb-0310-9956-ffa450edef68

modules/http/byterange_filter.c

index f7f4194c66e607dfbe4ec769bc348c73966c372f..82f856b17e48cbf3231d74f12b9e0f01b86d2700 100644 (file)
@@ -391,7 +391,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_byterange_filter(ap_filter_t *f,
         }
 
         APR_BRIGADE_CONCAT(bsend, tmpbb);
-        if (i && i % 32 == 0) {
+        if (i && !(i & 0x1F)) {
             /*
              * Every now and then, pass what we have down the filter chain.
              * In this case, the content-length filter cannot calculate and