commit 8460493b18d3aeb17947c988b2062fc546cde80a
Author:     cmgraff <[email protected]>
AuthorDate: Thu Feb 23 12:53:23 2017 -0600
Commit:     Quentin Rameau <[email protected]>
CommitDate: Thu Feb 23 20:05:51 2017 +0100

    [libc] Fix typo in strcmp

diff --git a/libc/src/strcmp.c b/libc/src/strcmp.c
index dae93fc..b7b6aa3 100644
--- a/libc/src/strcmp.c
+++ b/libc/src/strcmp.c
@@ -5,7 +5,7 @@
 int
 strcmp(const char *s1, const char *s2)
 {
-       while (*s1 && *s2 && *s1 != *s2)
+       while (*s1 && *s2 && *s1 == *s2)
                ++s1, ++s2;
        return *(unsigned char *)s1 - *(unsigned char *)s2;
 }

Reply via email to