diff options
author | Marek Olšák <[email protected]> | 2019-05-09 21:04:23 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-05-29 21:13:35 -0400 |
commit | b5697c311b6f29dee40b96c48bad3279e3667c1e (patch) | |
tree | d0708cd5249ec8d3535bda8134f91ea79af2ffde /src/util | |
parent | 0f1b68ebeeee196ced42d8ac66d231338b507bad (diff) |
Change a few frequented uses of DEBUG to !NDEBUG
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 <[email protected]>
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/slab.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 }; |