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/mesa/main/errors.c | |
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/mesa/main/errors.c')
-rw-r--r-- | src/mesa/main/errors.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/main/errors.c b/src/mesa/main/errors.c index 995b0510575..071b75c4727 100644 --- a/src/mesa/main/errors.c +++ b/src/mesa/main/errors.c @@ -59,7 +59,7 @@ output_if_debug(const char *prefixString, const char *outputString, LogFile = fopen(logFile, "w"); if (!LogFile) LogFile = stderr; -#ifdef DEBUG +#ifndef NDEBUG /* in debug builds, print messages unless MESA_DEBUG="silent" */ if (MESA_DEBUG_FLAGS & DEBUG_SILENT) debug = 0; @@ -189,7 +189,7 @@ should_output(struct gl_context *ctx, GLenum error, const char *fmtString) if (debug == -1) { const char *debugEnv = getenv("MESA_DEBUG"); -#ifdef DEBUG +#ifndef NDEBUG if (debugEnv && strstr(debugEnv, "silent")) debug = GL_FALSE; else @@ -378,7 +378,7 @@ _mesa_error_no_memory(const char *caller) void _mesa_debug( const struct gl_context *ctx, const char *fmtString, ... ) { -#ifdef DEBUG +#ifndef NDEBUG char s[MAX_DEBUG_MESSAGE_LENGTH]; va_list args; va_start(args, fmtString); |