On Thu, Aug 27, 2015 at 2:13 PM,  <[email protected]> wrote:
>
> Modified: httpd/httpd/trunk/server/util.c
> URL: 
> http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util.c?rev=1698133&r1=1698132&r2=1698133&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/server/util.c (original)
> +++ httpd/httpd/trunk/server/util.c Thu Aug 27 12:13:59 2015
> @@ -3149,15 +3149,23 @@ AP_DECLARE(char *) ap_get_exec_line(apr_
>      return apr_pstrndup(p, buf, k);
>  }
>
> -AP_DECLARE(int) ap_array_index(const apr_array_header_t *array, const char 
> *s)
> +AP_DECLARE(int) ap_array_index(const apr_array_header_t *array,
> +                               const char *s,
> +                               apr_size_t start)
>  {
> -    int i;
> -    for (i = 0; i < array->nelts; i++) {
> +    apr_size_t i;

Maybe here:
    if (start < 0) {
        return -1;
    }
?

> +    for (i = start; i < array->nelts; i++) {
>          const char *p = APR_ARRAY_IDX(array, i, const char *);
>          if (!strcmp(p, s)) {
> -            return i;
> +            return (int)i;
>          }
>      }
>      return -1;
>  }

Reply via email to