scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 70675f32291a81492c2ebfbf8f5fe2cf827510a6
parent f3073a83ac278dec8774e0aee1356b757fb48b04
Author: Quentin Rameau <quinq@fifth.space>
Date:   Fri, 17 Feb 2017 01:08:08 +0100

[libc] Fix strchr

Don't forget that the terminating NULL should be checked too.

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

diff --git a/libc/src/strchr.c b/libc/src/strchr.c @@ -7,5 +7,5 @@ strchr(const char *s, int c) { while (*s && *s != c) ++s; - return (*s) ? (char *) s : NULL; + return (*s == c) ? (char *)s : NULL; }