You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2011/08/28 22:02:38 UTC
svn commit: r1162581 - /httpd/httpd/trunk/modules/http/byterange_filter.c
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++;
}
}