util: use standard name for strchrnul()
authorEric Engestrom <eric.engestrom@intel.com>
Tue, 20 Nov 2018 11:24:55 +0000 (11:24 +0000)
committerEric Engestrom <eric.engestrom@intel.com>
Fri, 19 Jul 2019 21:39:38 +0000 (22:39 +0100)
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>
src/amd/common/ac_debug.c
src/gallium/auxiliary/pipe-loader/pipe_loader.c
src/util/u_string.h

index 1632106fdb93da2d1af57c6a4b90c4aa360d40ee..36a01fd8bf7d7eabb46ab625d583537cc0cf16d3 100644 (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)
index 29718a2aa20da7924cf117b194cc35558b2647fe..b435486903ca255d796a8db3bb09963c4530f132 100644 (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)
index 751ae909e1b2684017c69eee50b0e9682a9bf032..b43c42650e132a9f3f14d65ff965d93a50d892d6 100644 (file)
 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)
 {