From bdf8a555586d799896e0aff9adf1ed4749ab120a Mon Sep 17 00:00:00 2001 From: eadler Date: Fri, 2 Dec 2011 15:41:09 +0000 Subject: Revert r227812 and r227808 per discussion Reviewed by: many Approved by: des --- lib/libc/string/strncmp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/libc/string/strncmp.c') diff --git a/lib/libc/string/strncmp.c b/lib/libc/string/strncmp.c index 8da2c43..5bc3d5e 100644 --- a/lib/libc/string/strncmp.c +++ b/lib/libc/string/strncmp.c @@ -39,10 +39,8 @@ 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)) + if (n == 0) return (0); - do { if (*s1 != *s2++) return (*(const unsigned char *)s1 - -- cgit v1.1