aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorAnders Roxell <anders.roxell@linaro.org>2014-10-30 21:47:14 +0100
committerMaxim Uvarov <maxim.uvarov@linaro.org>2014-11-01 01:04:18 +0300
commitc781683bbc66db4343c07246fe59d3f5d99533f6 (patch)
tree172fc8a61807434c7d43d3b555d24a140fa413b3 /platform
parent8a66b60891d97f565c6a3dd676d4d9fa3ce52ab5 (diff)
odp_debug.h: ensure the macro is always compiled
To ensure there is no stale code that can be broken over time. Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-and-tested-by: Mike Holmes <mike.holmes@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform')
-rw-r--r--platform/linux-generic/include/api/odp_debug.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/platform/linux-generic/include/api/odp_debug.h b/platform/linux-generic/include/api/odp_debug.h
index 0a2043039..c9b2edd66 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.