diff options
Diffstat (limited to 'lib/libc/string/strcasecmp.c')
-rw-r--r-- | lib/libc/string/strcasecmp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/string/strcasecmp.c b/lib/libc/string/strcasecmp.c index dae91d3..582399d 100644 --- a/lib/libc/string/strcasecmp.c +++ b/lib/libc/string/strcasecmp.c @@ -49,7 +49,7 @@ strcasecmp_l(const char *s1, const char *s2, locale_t locale) *us1 = (const u_char *)s1, *us2 = (const u_char *)s2; if (s1 == s2) - return (0); + return (0); FIX_LOCALE(locale); @@ -73,8 +73,9 @@ strncasecmp_l(const char *s1, const char *s2, size_t n, locale_t locale) *us1 = (const u_char *)s1, *us2 = (const u_char *)s2; - if (( s1 == s2) | (n == 0)) - return (0); + /* use a bitwise or to avoid an additional branch instruction */ + if ((s1 == s2) | (n == 0)) + return (0); do { |