From f7e1eccf5e3323ca64730e05379f4d090578b804 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Thu, 7 Jul 2022 18:01:34 -0400 Subject: [PATCH] util: Gate simple_mtx_assert_locked on !NDEBUG ..Instead of DEBUG so these work in debugoptimized builds. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Eric Engestrom Acked-by: Dylan Baker Part-of: --- src/util/simple_mtx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/simple_mtx.h b/src/util/simple_mtx.h index 9434745..e9988e0 100644 --- a/src/util/simple_mtx.h +++ b/src/util/simple_mtx.h @@ -168,7 +168,7 @@ simple_mtx_unlock(simple_mtx_t *mtx) static inline void simple_mtx_assert_locked(simple_mtx_t *mtx) { -#ifdef DEBUG +#ifndef NDEBUG /* NOTE: this would not work for recursive mutexes, but * mtx_t doesn't support those */ -- 2.7.4