util: use standard name for strchrnul()

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Eric Engestrom 2018-11-20 11:24:55 +00:00
parent 367bb55c17
commit 09a8a39940
3 changed files with 4 additions and 7 deletions

View file

@ -542,7 +542,7 @@ static void format_ib_output(FILE *f, char *out)
if (indent)
print_spaces(f, indent);
char *end = util_strchrnul(out, '\n');
char *end = strchrnul(out, '\n');
fwrite(out, end - out, 1, f);
fputc('\n', f); /* always end with a new line */
if (!*end)

View file

@ -138,7 +138,7 @@ pipe_loader_find_module(const char *driver_name,
int len, ret;
for (next = library_paths; *next; library_paths = next + 1) {
next = util_strchrnul(library_paths, ':');
next = strchrnul(library_paths, ':');
len = next - library_paths;
if (len)

View file

@ -50,12 +50,9 @@
extern "C" {
#endif
#ifdef _GNU_SOURCE
#define util_strchrnul strchrnul
#else
#ifndef _GNU_SOURCE
#define strchrnul util_strchrnul
static inline char *
util_strchrnul(const char *s, char c)
{