scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit 1dcc4bd503a9705419f3405e8db92019a7e02c26
parent 09de064a1297f7af75ad918311c63641629a43ed
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Thu,  7 Dec 2017 09:38:51 +0000

[lib/c] Fix small typo in strncmp()

We want equal strings, no different strings

Diffstat:
Mlib/c/src/strncmp.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/c/src/strncmp.c b/lib/c/src/strncmp.c @@ -8,7 +8,7 @@ strncmp(const char *s1, const char *s2, size_t n) if (n == 0) return 0; - while ((c = *s1) != '\0' && c != *s2) { + while ((c = *s1) != '\0' && c == *s2) { if (--n == 0) return 0; ++s1, ++s2;