From: Ruediger Pluem Date: Mon, 29 Aug 2011 07:51:29 +0000 (+0000) Subject: * Bit operators should be more efficient then the modulo operator (provided the compi... X-Git-Tag: 2.3.15~318 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=547ed3b549ba69923f89b367df2052644904cf0a;p=apache * Bit operators should be more efficient then the modulo operator (provided the compiler does not optimize on its own) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162669 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/byterange_filter.c b/modules/http/byterange_filter.c index f7f4194c66..82f856b17e 100644 --- a/modules/http/byterange_filter.c +++ b/modules/http/byterange_filter.c @@ -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