diff mbox

[3/4] odp_debug.h: ensure the macro is always compiled

Message ID 1414702035-3549-4-git-send-email-anders.roxell@linaro.org
State Accepted
Commit c781683bbc66db4343c07246fe59d3f5d99533f6
Headers show

Commit Message

Anders Roxell Oct. 30, 2014, 8:47 p.m. UTC
To ensure there is no stale code that can be broken over time.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 platform/linux-generic/include/api/odp_debug.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/platform/linux-generic/include/api/odp_debug.h b/platform/linux-generic/include/api/odp_debug.h
index 0a20430..c9b2edd 100644
--- a/platform/linux-generic/include/api/odp_debug.h
+++ b/platform/linux-generic/include/api/odp_debug.h
@@ -57,12 +57,11 @@  extern "C" {
 /**
  * Runtime assertion-macro - aborts if 'cond' is false.
  */
-#ifndef ODP_NO_DEBUG
 #define ODP_ASSERT(cond, msg) \
-	do { if (!(cond)) {ODP_ERR("%s\n", msg); abort(); } } while (0)
-#else
-#define ODP_ASSERT(cond, msg)
-#endif
+	do { if ((ODP_DEBUG == 1) && (!(cond))) { \
+		ODP_ERR("%s\n", msg); \
+		abort(); } \
+	} while (0)
 
 /**
  * Compile time assertion-macro - fail compilation if cond is false.