summaryrefslogtreecommitdiffstats
path: root/libc/string/strncmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/string/strncmp.c')
-rw-r--r--libc/string/strncmp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libc/string/strncmp.c b/libc/string/strncmp.c
index 9da41ab..1768808 100644
--- a/libc/string/strncmp.c
+++ b/libc/string/strncmp.c
@@ -38,14 +38,13 @@
int
strncmp(const char *s1, const char *s2, size_t n)
{
-
if (n == 0)
return (0);
do {
if (*s1 != *s2++)
return (*(unsigned char *)s1 - *(unsigned char *)--s2);
if (*s1++ == 0)
- break;
+ break;
} while (--n != 0);
return (0);
}