[Piglit] [PATCH] util: add casts in strchrnul()
Vinson Lee
vlee at freedesktop.org
Tue Oct 24 21:49:19 UTC 2017
On Fri, Oct 13, 2017 at 9:31 AM, Brian Paul <brianp at vmware.com> wrote:
> 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
>
Tested-by: Vinson Lee <vlee at freedesktop.org>
More information about the Piglit
mailing list