[Piglit] [PATCH] util: add casts in strchrnul()
Brian Paul
brianp at vmware.com
Fri Oct 13 16:31:52 UTC 2017
To fix build on MacOS.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103248
---
tests/util/piglit-util.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/util/piglit-util.h b/tests/util/piglit-util.h
index c4e7818..3757f86 100644
--- a/tests/util/piglit-util.h
+++ b/tests/util/piglit-util.h
@@ -305,9 +305,9 @@ strtol_hex(const char *nptr, char **endptr)
static inline char *
strchrnul(const char *s, int c)
{
- char *t = strchr(s, c);
+ const char *t = strchr(s, c);
- return (t == NULL) ? ((char *) s + strlen(s)) : t;
+ return (t == NULL) ? ((char *) s + strlen(s)) : (char *) t;
}
#endif
--
1.9.1
More information about the Piglit
mailing list