[Beignet] [PATCH] Fix comparison in if() check.
Yang, Rong R
rong.r.yang at intel.com
Tue Jul 14 01:43:51 PDT 2015
LGTM, will push it later, thanks.
> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> Koop Mast
> Sent: Monday, July 13, 2015 03:50
> To: beignet at lists.freedesktop.org
> Cc: Koop Mast
> Subject: [Beignet] [PATCH] Fix comparison in if() check.
>
> std::strstr() returns a char * or NULL if the substring isn't found not false.
>
> Signed-off-by: Koop Mast <kwm at rainbow-runner.nl>
> ---
> utests/compiler_half.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/utests/compiler_half.cpp b/utests/compiler_half.cpp index
> ce0f7da..e8ed286 100644
> --- a/utests/compiler_half.cpp
> +++ b/utests/compiler_half.cpp
> @@ -115,7 +115,7 @@ static int check_half_device(void)
> if (!param_value.empty())
> extStr = std::string(¶m_value.front(), param_value_size-1);
>
> - if (std::strstr(extStr.c_str(), "cl_khr_fp16") == false) {
> + if (std::strstr(extStr.c_str(), "cl_khr_fp16") == NULL) {
> printf("No cl_khr_fp16, Skip!");
> return 0;
> }
> --
> 2.4.5
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list