From b5697c311b6f29dee40b96c48bad3279e3667c1e Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Thu, 9 May 2019 21:04:23 -0400 Subject: Change a few frequented uses of DEBUG to !NDEBUG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit debugoptimized builds don't define NDEBUG, but they also don't define DEBUG. We want to enable cheap debug code for these builds. I only chose those occurences that I care about. Reviewed-by: Mathias Fröhlich --- src/util/slab.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/util/slab.c') diff --git a/src/util/slab.c b/src/util/slab.c index 5477c75d443..62634034fdc 100644 --- a/src/util/slab.c +++ b/src/util/slab.c @@ -31,7 +31,7 @@ #define SLAB_MAGIC_ALLOCATED 0xcafe4321 #define SLAB_MAGIC_FREE 0x7ee01234 -#ifdef DEBUG +#ifndef NDEBUG #define SET_MAGIC(element, value) (element)->magic = (value) #define CHECK_MAGIC(element, value) assert((element)->magic == (value)) #else @@ -51,7 +51,7 @@ struct slab_element_header { */ intptr_t owner; -#ifdef DEBUG +#ifndef NDEBUG intptr_t magic; #endif }; -- cgit v1.2.3