scc

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

commit ff2c7c9b2b116228e9170c5b77c987572b5ad5ba
parent 154b5717a3ebfb71ccb7fa130a64cf90eae0bf5b
Author: Quentin Rameau <quinq@fifth.space>
Date:   Fri, 17 Feb 2017 01:29:50 +0100

[libc] Make strrchr style consistent with the rest

Diffstat:
libc/src/strrchr.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

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