tweaks: rearrange a few if statements more symmetrically

master
Benno Schulenberg 2018-04-13 20:43:08 +02:00
parent d4304ca88c
commit 0353a24400
1 changed files with 6 additions and 3 deletions

View File

@ -325,15 +325,18 @@ const char *strstrwrapper(const char *haystack, const char *needle,
else
return haystack + regmatches[0].rm_so;
}
if (ISSET(CASE_SENSITIVE)) {
if (ISSET(BACKWARDS_SEARCH))
return revstrstr(haystack, needle, start);
else
return strstr(start, needle);
} else if (ISSET(BACKWARDS_SEARCH))
return mbrevstrcasestr(haystack, needle, start);
}
return mbstrcasestr(start, needle);
if (ISSET(BACKWARDS_SEARCH))
return mbrevstrcasestr(haystack, needle, start);
else
return mbstrcasestr(start, needle);
}
/* This is a wrapper for the perror() function. The wrapper temporarily