From bf6a3f42949dc13c7e8568b3be2fcc58818ce3b1 Mon Sep 17 00:00:00 2001 From: Siu Chi Chan Date: Wed, 20 Sep 2017 01:38:28 -0400 Subject: [PATCH] ensure the condition is evaluated before applying the negation operator --- hipamd/include/hip/hcc_detail/hip_runtime.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hipamd/include/hip/hcc_detail/hip_runtime.h b/hipamd/include/hip/hcc_detail/hip_runtime.h index 2386ea08cb..379fc05f5b 100644 --- a/hipamd/include/hip/hcc_detail/hip_runtime.h +++ b/hipamd/include/hip/hcc_detail/hip_runtime.h @@ -99,7 +99,7 @@ extern int HIP_TRACE_API; // TODO-HCC add a dummy implementation of assert, need to replace with a proper kernel exit call. #if __HIP_DEVICE_COMPILE__ == 1 #undef assert - #define assert(COND) { if (!COND) {abort();} } + #define assert(COND) { if (!(COND)) {abort();} } #endif