Chromium Code Reviews| Index: fusl/src/string/strchr.c |
| diff --git a/fusl/src/string/strchr.c b/fusl/src/string/strchr.c |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..bfae8f9f846a01c14d288d34e8659f265a9daf2e |
| --- /dev/null |
| +++ b/fusl/src/string/strchr.c |
| @@ -0,0 +1,9 @@ |
| +#include <string.h> |
| + |
| +char *__strchrnul(const char *, int); |
| + |
| +char *strchr(const char *s, int c) |
| +{ |
| + char *r = __strchrnul(s, c); |
| + return *(unsigned char *)r == (unsigned char)c ? r : 0; |
| +} |