const unsigned char *ps1 = (const unsigned char *) s1;
const unsigned char *ps2 = (const unsigned char *) s2;
- while (ucharmap[*ps1] == ucharmap[*ps2++]) {
+ while (ucharmap[*ps1] == ucharmap[*ps2]) {
if (*ps1++ == '\0') {
return (0);
}
+ ps2++;
}
- return (ucharmap[*ps1] - ucharmap[*--ps2]);
+ return (ucharmap[*ps1] - ucharmap[*ps2]);
}
AP_DECLARE(int) ap_casecmpstrn(const char *s1, const char *s2, apr_size_t n)
const unsigned char *ps1 = (const unsigned char *) s1;
const unsigned char *ps2 = (const unsigned char *) s2;
while (n--) {
- if (ucharmap[*ps1] != ucharmap[*ps2++]) {
- return (ucharmap[*ps1] - ucharmap[*--ps2]);
+ if (ucharmap[*ps1] != ucharmap[*ps2]) {
+ return (ucharmap[*ps1] - ucharmap[*ps2]);
}
if (*ps1++ == '\0') {
break;
}
+ ps2++;
}
return (0);
}