test: allow null as 'function name' for logging (coverity).

Change-Id: I047a4c372514e85d19dd3d3719f8ad3be046171e
This commit is contained in:
Leo Yuriev 2017-07-04 12:36:00 +03:00
parent 136e98fb93
commit 66f8327642

View File

@ -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;
}