stef...@apache.org wrote:

>>  +/* Return the smallest byte index at which positions left of A and B 
>> differ
>>  + * (A[-result] != B[-result]).  If no difference can be found in the first
>>  + * MAX_LEN characters, MAX_LEN will be returned.
>>  + */
>>  +static apr_size_t
>>  +reverse_match_length(const char *a, const char *b, apr_size_t max_len)
>>  +{
>>  +  apr_size_t pos = 0;
[...]
>>  +  while (++pos <= max_len)
>>  +    if (a[-pos] != b[-pos])
>>  +      break;

This loop looks like it would breaks when the doc string has been satisfied
(A[-result] != B[-result]), IFF "result" were equal to "pos"...

>>  +
>>  +  return pos-1;
>>  +}

... but then you return "pos-1".  That's wrong, isn't it?

- Julian

Reply via email to