File: strchrnul.c

package info (click to toggle)
pacemaker 2.0.1-5%2Bdeb10u2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 55,644 kB
  • sloc: xml: 130,752; ansic: 96,958; python: 5,692; sh: 4,852; makefile: 1,082
file content (15 lines) | stat: -rw-r--r-- 297 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <crm_internal.h>
/* Borrowed from gnulib's strchrnul.c under GLPv2+ */

#include <string.h>
/* Find the first occurrence of C in S or the final NUL byte.  */
char *
strchrnul(const char *s, int c_in)
{
    char c = c_in;

    while (*s && (*s != c))
        s++;

    return (char *)s;
}