summaryrefslogtreecommitdiffstats
path: root/lib/libc/string/strncmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/string/strncmp.c')
-rw-r--r--lib/libc/string/strncmp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libc/string/strncmp.c b/lib/libc/string/strncmp.c
index 46db3f9..8da2c43 100644
--- a/lib/libc/string/strncmp.c
+++ b/lib/libc/string/strncmp.c
@@ -39,6 +39,7 @@ int
strncmp(const char *s1, const char *s2, size_t n)
{
+ /* use a bitwise or to avoid an additional branch instruction */
if ((n == 0) | (s1 == s2))
return (0);
OpenPOWER on IntegriCloud