1 // Copyright 2016 The Fuchsia Authors
2 // Copyright (c) 2008 Travis Geiselbrecht
3 //
4 // Use of this source code is governed by a MIT-style
5 // license that can be found in the LICENSE file or at
6 // https://opensource.org/licenses/MIT
7 
8 #include <string.h>
9 #include <sys/types.h>
10 
11 char *
strchr(const char * s,int c)12 strchr(const char *s, int c)
13 {
14     for (; *s != (char) c; ++s)
15         if (*s == '\0')
16             return NULL;
17     return (char *) s;
18 }
19