util/debug: move null checks out of debug message macro

this otherwise causes tons of compiler warnings

cc: mesa-stable

Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22196>
This commit is contained in:
Mike Blumenkrantz
2023-04-19 09:20:36 -04:00
committed by Marge Bot
parent 3909471288
commit a6c8d74cd7
2 changed files with 6 additions and 7 deletions
+3 -2
View File
@@ -67,10 +67,11 @@ _util_debug_message(struct util_debug_callback *cb,
enum util_debug_type type,
const char *fmt, ...)
{
if (!cb || !cb->debug_message)
return;
va_list args;
va_start(args, fmt);
if (cb && cb->debug_message)
cb->debug_message(cb->data, id, type, fmt, args);
cb->debug_message(cb->data, id, type, fmt, args);
va_end(args);
}