1 #include <crm_internal.h>
2 /* Borrowed from gnulib's strchrnul.c under GLPv2+ */
3
4 #include <string.h>
5 /* Find the first occurrence of C in S or the final NUL byte. */
6 char *
7 strchrnul(const char *s, int c_in)
/* ![[previous]](../icons/n_left.png)
![[next]](../icons/n_right.png)
![[first]](../icons/n_first.png)
![[last]](../icons/n_last.png)
![[top]](../icons/top.png)
![[bottom]](../icons/bottom.png)
![[index]](../icons/index.png)
*/
8 {
9 char c = c_in;
10
11 while (*s && (*s != c))
12 s++;
13
14 return (char *)s;
15 }