httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1162581 - /httpd/httpd/trunk/modules/http/byterange_filter.c
Date Sun, 28 Aug 2011 20:02:38 GMT
Author: sf
Date: Sun Aug 28 20:02:38 2011
New Revision: 1162581

URL: http://svn.apache.org/viewvc?rev=1162581&view=rev
Log:
Fix iteration over string

Modified:
    httpd/httpd/trunk/modules/http/byterange_filter.c

Modified: httpd/httpd/trunk/modules/http/byterange_filter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/byterange_filter.c?rev=1162581&r1=1162580&r2=1162581&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/http/byterange_filter.c (original)
+++ httpd/httpd/trunk/modules/http/byterange_filter.c Sun Aug 28 20:02:38 2011
@@ -433,7 +433,7 @@ static int ap_set_byterange(request_rec 
     int in_merge = 0;
     indexes_t *idx;
     int overlaps = 0, reversals = 0;
-    int i, ranges = 1;
+    int ranges = 1;
     const char *it;
 
     if (r->assbackwards) {
@@ -492,8 +492,8 @@ static int ap_set_byterange(request_rec 
     range += 6;
     or = apr_pstrdup(r->pool, range);
     it = range;
-    for (i = 0; i < strlen(it); i++) {
-        if (*it == ',') {
+    while (*it) {
+        if (*it++ == ',') {
             ranges++;
         }
     }



Mime
View raw message