From abb883009e30fa354c94e50499c907f991e06a99 Mon Sep 17 00:00:00 2001 From: Stefan Fritsch Date: Sun, 28 Aug 2011 20:02:38 +0000 Subject: [PATCH] Fix iteration over string git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1162581 13f79535-47bb-0310-9956-ffa450edef68 --- modules/http/byterange_filter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/http/byterange_filter.c b/modules/http/byterange_filter.c index c49e35c07f..d314c60a0d 100644 --- a/modules/http/byterange_filter.c +++ b/modules/http/byterange_filter.c @@ -433,7 +433,7 @@ static int ap_set_byterange(request_rec *r, apr_off_t clength, 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 *r, apr_off_t clength, range += 6; or = apr_pstrdup(r->pool, range); it = range; - for (i = 0; i < strlen(it); i++) { - if (*it == ',') { + while (*it) { + if (*it++ == ',') { ranges++; } } -- 2.50.1