]> git.kaiwu.me - njs.git/commitdiff
Fixed njs_assert() macro.
authorDmitry Volyntsev <xeioex@nginx.com>
Thu, 29 Sep 2022 23:32:52 +0000 (16:32 -0700)
committerDmitry Volyntsev <xeioex@nginx.com>
Thu, 29 Sep 2022 23:32:52 +0000 (16:32 -0700)
Previously, the argument was always evaluated, even if
NJS_DEBUG was undefined.

src/njs_assert.h

index c4de79b5889adee26d44c3eb5d7f32c8f0e6a28f..d325613d7390d0fc36c83cc81cde5bd6544724c2 100644 (file)
@@ -29,8 +29,8 @@
 
 #else
 
-#define njs_assert(condition) (void) (condition)
-#define njs_assert_msg(condition, fmt, ...) (void) (condition)
+#define njs_assert(condition)
+#define njs_assert_msg(condition, fmt, ...)
 
 #endif