1 /*
2  *  Copyright (C) 1991, 1992  Linus Torvalds
3  */
4 
5 #include <xen/string.h>
6 
7 /**
8  * strchr - Find the first occurrence of a character in a string
9  * @s: The string to be searched
10  * @c: The character to search for
11  */
12 char *(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 
20 /*
21  * Local variables:
22  * mode: C
23  * c-file-style: "BSD"
24  * c-basic-offset: 8
25  * tab-width: 8
26  * indent-tabs-mode: t
27  * End:
28  */
29