aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2018-11-20 11:24:55 +0000
committerEric Engestrom <[email protected]>2019-07-19 22:39:38 +0100
commit09a8a39940ad02951b62454a5d222af669fef694 (patch)
tree0173b84bc6eb25db0b28d428ce5a0783cf983b97 /src
parent367bb55c17abce6b571ab3cf36e9ea95f4c2dfca (diff)
util: use standard name for strchrnul()
Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/common/ac_debug.c2
-rw-r--r--src/gallium/auxiliary/pipe-loader/pipe_loader.c2
-rw-r--r--src/util/u_string.h7
3 files changed, 4 insertions, 7 deletions
diff --git a/src/amd/common/ac_debug.c b/src/amd/common/ac_debug.c
index 1632106fdb9..36a01fd8bf7 100644
--- a/src/amd/common/ac_debug.c
+++ b/src/amd/common/ac_debug.c
@@ -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)
diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.c b/src/gallium/auxiliary/pipe-loader/pipe_loader.c
index 29718a2aa20..b435486903c 100644
--- a/src/gallium/auxiliary/pipe-loader/pipe_loader.c
+++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.c
@@ -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)
diff --git a/src/util/u_string.h b/src/util/u_string.h
index 751ae909e1b..b43c42650e1 100644
--- a/src/util/u_string.h
+++ b/src/util/u_string.h
@@ -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)
{