From 93e6891ef03611804b5b9b7ac9d200c38981d02f Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 16 Mar 2014 22:11:26 +0100 Subject: [PATCH] fix macro, use parens around arguments. --- CuTest.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CuTest.h b/CuTest.h index 8b32773..17e41b4 100644 --- a/CuTest.h +++ b/CuTest.h @@ -1,4 +1,4 @@ -#ifndef CU_TEST_H +ifndef CU_TEST_H #define CU_TEST_H #include @@ -86,8 +86,8 @@ void CuAssertPtrEquals_LineMsg(CuTest* tc, #define CuAssertPtrEquals(tc,ex,ac) CuAssertPtrEquals_LineMsg((tc),__FILE__,__LINE__,NULL,(ex),(ac)) #define CuAssertPtrEquals_Msg(tc,ms,ex,ac) CuAssertPtrEquals_LineMsg((tc),__FILE__,__LINE__,(ms),(ex),(ac)) -#define CuAssertPtrNotNull(tc,p) CuAssert_Line((tc),__FILE__,__LINE__,"null pointer unexpected",(p != NULL)) -#define CuAssertPtrNotNullMsg(tc,msg,p) CuAssert_Line((tc),__FILE__,__LINE__,(msg),(p != NULL)) +#define CuAssertPtrNotNull(tc,p) CuAssert_Line((tc),__FILE__,__LINE__,"null pointer unexpected",((p) != NULL)) +#define CuAssertPtrNotNullMsg(tc,msg,p) CuAssert_Line((tc),__FILE__,__LINE__,(msg),((p) != NULL)) /* CuSuite */