Author: tfaber
Date: Sun Jan 19 09:28:53 2014
New Revision: 61686
URL:
http://svn.reactos.org/svn/reactos?rev=61686&view=rev
Log:
[DDK][XDK]
- Do not evaluate the NT_ASSERT macro's parameter before stringifying it. Forgot this
in r61008/CORE-7758
Modified:
trunk/reactos/include/ddk/wdm.h
trunk/reactos/include/xdk/rtlfuncs.h
Modified: trunk/reactos/include/ddk/wdm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=6168…
==============================================================================
--- trunk/reactos/include/ddk/wdm.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/wdm.h [iso-8859-1] Sun Jan 19 09:28:53 2014
@@ -11063,9 +11063,21 @@
(__assert_annotationW(msg), \
DbgRaiseAssertionFailure(), FALSE) : TRUE)
-#define NT_ASSERT(exp) ((void)NT_VERIFY(exp))
-#define NT_ASSERTMSG(msg, exp) ((void)NT_VERIFYMSG(msg, exp))
-#define NT_ASSERTMSGW(msg, exp) ((void)NT_VERIFYMSGW(msg, exp))
+/* Can't reuse verify, see above */
+#define NT_ASSERT(exp) \
+ ((VOID)((!(exp)) ? \
+ (__assert_annotationA(#exp), \
+ DbgRaiseAssertionFailure(), FALSE) : TRUE))
+
+#define NT_ASSERTMSG(msg, exp) \
+ ((VOID)((!(exp)) ? \
+ (__assert_annotationA(msg), \
+ DbgRaiseAssertionFailure(), FALSE) : TRUE))
+
+#define NT_ASSERTMSGW(msg, exp) \
+ ((VOID)((!(exp)) ? \
+ (__assert_annotationW(msg), \
+ DbgRaiseAssertionFailure(), FALSE) : TRUE))
#else /* !DBG */
Modified: trunk/reactos/include/xdk/rtlfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/rtlfuncs.h?rev…
==============================================================================
--- trunk/reactos/include/xdk/rtlfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/rtlfuncs.h [iso-8859-1] Sun Jan 19 09:28:53 2014
@@ -3133,9 +3133,21 @@
(__assert_annotationW(msg), \
DbgRaiseAssertionFailure(), FALSE) : TRUE)
-#define NT_ASSERT(exp) ((void)NT_VERIFY(exp))
-#define NT_ASSERTMSG(msg, exp) ((void)NT_VERIFYMSG(msg, exp))
-#define NT_ASSERTMSGW(msg, exp) ((void)NT_VERIFYMSGW(msg, exp))
+/* Can't reuse verify, see above */
+#define NT_ASSERT(exp) \
+ ((VOID)((!(exp)) ? \
+ (__assert_annotationA(#exp), \
+ DbgRaiseAssertionFailure(), FALSE) : TRUE))
+
+#define NT_ASSERTMSG(msg, exp) \
+ ((VOID)((!(exp)) ? \
+ (__assert_annotationA(msg), \
+ DbgRaiseAssertionFailure(), FALSE) : TRUE))
+
+#define NT_ASSERTMSGW(msg, exp) \
+ ((VOID)((!(exp)) ? \
+ (__assert_annotationW(msg), \
+ DbgRaiseAssertionFailure(), FALSE) : TRUE))
#else /* !DBG */