scc

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

strchr.c (146B)


      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) ? (char *) s : NULL;
     12 }