summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension/error.h
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/dimension/error.h')
-rw-r--r--libdimension/dimension/error.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/libdimension/dimension/error.h b/libdimension/dimension/error.h
index 37b8d66..7abfb90 100644
--- a/libdimension/dimension/error.h
+++ b/libdimension/dimension/error.h
@@ -52,10 +52,12 @@ typedef enum {
#ifdef NDEBUG
#define dmnsn_assert(expr, str) ((void)0)
#else
- #define dmnsn_assert(expr, str) \
- if (!(expr)) { \
- dmnsn_error(DMNSN_SEVERITY_HIGH, (str)); \
- }
+ #define dmnsn_assert(expr, str) \
+ do { \
+ if (!(expr)) { \
+ dmnsn_error(DMNSN_SEVERITY_HIGH, (str)); \
+ } \
+ } while (0)
#endif
/* Called by dmnsn_error() - don't call directly */