Fix bug caught by -Wparentheses (#915)

This fix is required to build with -Wall -Werror with GCC >= 5.

Signed-off-by: Einar Hov <einar.hov@arm.com>
This commit is contained in:
Einar Hov
2020-08-21 12:09:22 +01:00
committed by GitHub
parent b79c02729f
commit a0d679fe41

View File

@@ -595,7 +595,8 @@ static int test_buffer_map_read( cl_device_id deviceID, cl_context context, cl_c
else
buffers[i] = clCreateBuffer(context, flag_set[src_flag_id], ptrSizes[i] * num_elements, NULL, &err);
if ( ! buffers[i] | err){
if (!buffers[i] || err)
{
print_error(err, "clCreateBuffer failed\n" );
align_free( outptr[i] );
return -1;