* reload1.c (delete_output_reload): Avoid ambigous else.
[official-gcc.git] / libiberty / strchr.c
blob22976ce248af9b9559eedf285ae2ecdd80973b4b
1 /* Portable version of strchr()
2 This function is in the public domain. */
4 /*
5 NAME
6 strchr -- return pointer to first occurance of a character
8 SYNOPSIS
9 char *strchr (const char *s, int c)
11 DESCRIPTION
12 Returns a pointer to the first occurance of character C in
13 string S, or a NULL pointer if no occurance is found.
15 BUGS
16 Behavior when character is the null character is implementation
17 dependent.
20 #include <ansidecl.h>
22 char *
23 strchr (s, c)
24 register CONST char *s;
25 int c;
27 do {
28 if (*s == c)
30 return (char*)s;
32 } while (*s++);
33 return (0);