scc

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

strchr.c (137B)


      1 #include <string.h>
      2 
      3 #undef strchr
      4 
      5 char *
      6 strchr(const char *s, int c)
      7 {
      8 	while (*s && *s != c)
      9 		++s;
     10 
     11 	return (*s == c) ? s : NULL;
     12 }