summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2017-11-07 10:48:12 +0100
committerMichel Dänzer <[email protected]>2017-11-07 16:47:15 +0100
commitcd3b55ad07dbf1a7cfd3b30109d0562bea692576 (patch)
treed409172dbf29bedf2ac6b0f37641fd5c805c3d2b
parent1e6f9ea21230229c0256d8189427411298132638 (diff)
gallium: Guard assertions by NDEBUG instead of DEBUG
This matches the standard assert.h header. Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r--src/gallium/auxiliary/util/u_debug.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_debug.h b/src/gallium/auxiliary/util/u_debug.h
index 63940b72253..d2ea89f59c1 100644
--- a/src/gallium/auxiliary/util/u_debug.h
+++ b/src/gallium/auxiliary/util/u_debug.h
@@ -185,7 +185,7 @@ void _debug_assert_fail(const char *expr,
* For non debug builds the assert macro will expand to a no-op, so do not
* call functions with side effects in the assert expression.
*/
-#ifdef DEBUG
+#ifndef NDEBUG
#define debug_assert(expr) ((expr) ? (void)0 : _debug_assert_fail(#expr, __FILE__, __LINE__, __FUNCTION__))
#else
#define debug_assert(expr) (void)(0 && (expr))