mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 18:34:12 +08:00
test: allow null as 'function name' for logging (coverity).
Change-Id: I047a4c372514e85d19dd3d3719f8ad3be046171e
This commit is contained in:
parent
136e98fb93
commit
66f8327642
@ -76,9 +76,10 @@ static void mdbx_debug_logger(int type, const char *function, int line,
|
|||||||
if (type & MDBX_DBG_PRINT)
|
if (type & MDBX_DBG_PRINT)
|
||||||
level = logging::verbose;
|
level = logging::verbose;
|
||||||
|
|
||||||
|
if (!function)
|
||||||
|
function = "unknown";
|
||||||
if (type & MDBX_DBG_ASSERT) {
|
if (type & MDBX_DBG_ASSERT) {
|
||||||
log_error("mdbx: assertion failure: %s, %d",
|
log_error("mdbx: assertion failure: %s, %d", function, line);
|
||||||
function ? function : "unknown", line);
|
|
||||||
level = logging::failure;
|
level = logging::failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user