mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 13:48:06 +02:00
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:
parent
367bb55c17
commit
09a8a39940
3 changed files with 4 additions and 7 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue