const char *begin = hay;
while ( (hay = memchr(hay, ndl[0], len)) ) {
- len = end - hay;
+ len = end - hay;
- /* done if matches up to capacity of buffer */
- if ( memcmp(hay, ndl, MIN(nlen, len)) == 0 ) {
+ /* done if matches up to capacity of buffer */
+ if ( memcmp(hay, ndl, MIN(nlen, len)) == 0 ) {
if (type == APREQ_MATCH_FULL && len < nlen)
hay = NULL; /* insufficient room for match */
- break;
+ break;
}
--len;
++hay;
break;
case '%':
- if (s + 2 < end && apr_isxdigit(s[1]) && apr_isxdigit(s[2]))
- {
+ if (s + 2 < end && apr_isxdigit(s[1]) && apr_isxdigit(s[2])) {
*d = hex2_to_char(s + 1);
s += 2;
- }
+ }
else if (s + 5 < end && (s[1] == 'u' || s[1] == 'U') &&
apr_isxdigit(s[2]) && apr_isxdigit(s[3]) &&
apr_isxdigit(s[4]) && apr_isxdigit(s[5]))
}
s += 5;
}
- else {
+ else {
*dlen = d - start;
*slen = s - src;
if (s + 5 < end
memmove(d, s, end - s);
d[end - s] = 0;
return APR_INCOMPLETE;
- }
+ }
break;
default: