From 66f8327642386291103d78985aca68e33a6a564f Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Tue, 4 Jul 2017 12:36:00 +0300 Subject: [PATCH] test: allow null as 'function name' for logging (coverity). Change-Id: I047a4c372514e85d19dd3d3719f8ad3be046171e --- test/test.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test.cc b/test/test.cc index 50426014..9a265e33 100644 --- a/test/test.cc +++ b/test/test.cc @@ -76,9 +76,10 @@ static void mdbx_debug_logger(int type, const char *function, int line, if (type & MDBX_DBG_PRINT) level = logging::verbose; + if (!function) + function = "unknown"; if (type & MDBX_DBG_ASSERT) { - log_error("mdbx: assertion failure: %s, %d", - function ? function : "unknown", line); + log_error("mdbx: assertion failure: %s, %d", function, line); level = logging::failure; }