[hackers] [scc] [libc] Fix typo in strcmp || cmgraff
commit 8460493b18d3aeb17947c988b2062fc546cde80a
Author: cmgraff <cm0graff_AT_gmail.com>
AuthorDate: Thu Feb 23 12:53:23 2017 -0600
Commit: Quentin Rameau <quinq_AT_fifth.space>
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
_AT_@ -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;
}
Received on Thu Feb 23 2017 - 20:06:23 CET
This archive was generated by hypermail 2.3.0
: Thu Feb 23 2017 - 20:12:21 CET