ref: 1d246cbf29513abd2169c53fcbe667cfdd94f29e
parent: 20deb5cd41e4d785cd3c40fd6bb9ec70d16aeaf3
author: Christopher M. Graff <cm0graff@gmail.com>
date: Tue Feb 28 06:56:45 EST 2017
[libc] Fix typo in strncmp
--- a/libc/src/strncmp.c
+++ b/libc/src/strncmp.c
@@ -5,7 +5,7 @@
int
strncmp(const char *s1, const char *s2, size_t n)
{
- for (; n && *s1 && *s2 && *s1 != *s2; --n, ++s1, ++s2);
+ for (; n && *s1 && *s2 && *s1 == *s2; --n, ++s1, ++s2);
/* nothing */;
return n ? (*(unsigned char *)s1 - *(unsigned char *)s2) : 0;
}