From da24fda578e88184eef7d88fe36f6cd11cb3e654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Mon, 3 Mar 2025 00:22:47 +0300 Subject: [PATCH] =?UTF-8?q?mdbx:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20print-=D0=BF=D0=BE=D0=B4=D0=BE=D0=B1?= =?UTF-8?q?=D0=BD=D1=8B=D1=85=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D0=B9?= =?UTF-8?q?=20=D0=B2=20chk=20=D0=B4=D0=BB=D1=8F=20=D1=83=D0=B4=D0=BE=D0=B1?= =?UTF-8?q?=D1=81=D1=82=D0=B2=D0=B0=20=D0=BE=D1=82=D0=BB=D0=B0=D0=B4=D0=BA?= =?UTF-8?q?=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/chk.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/chk.c b/src/chk.c index d848b014..9c83795c 100644 --- a/src/chk.c +++ b/src/chk.c @@ -159,6 +159,19 @@ __cold static MDBX_chk_line_t *MDBX_PRINTF_ARGS(2, 3) chk_print(MDBX_chk_line_t return line; } +__cold MDBX_MAYBE_UNUSED static void chk_println_va(MDBX_chk_scope_t *const scope, enum MDBX_chk_severity severity, + const char *fmt, va_list args) { + chk_line_end(chk_print_va(chk_line_begin(scope, severity), fmt, args)); +} + +__cold MDBX_MAYBE_UNUSED static void chk_println(MDBX_chk_scope_t *const scope, enum MDBX_chk_severity severity, + const char *fmt, ...) { + va_list args; + va_start(args, fmt); + chk_println_va(scope, severity, fmt, args); + va_end(args); +} + __cold static MDBX_chk_line_t *chk_print_size(MDBX_chk_line_t *line, const char *prefix, const uint64_t value, const char *suffix) { static const char sf[] = "KMGTPEZY"; /* LY: Kilo, Mega, Giga, Tera, Peta, Exa, Zetta, Yotta! */ @@ -455,9 +468,8 @@ __cold static void chk_dispose(MDBX_chk_internal_t *chk) { chk->cb->table_dispose(chk->usr, tbl); tbl->cookie = nullptr; } - if (tbl != &chk->table_gc && tbl != &chk->table_main) { + if (tbl != &chk->table_gc && tbl != &chk->table_main) osal_free(tbl); - } } } osal_free(chk->v2a_buf.iov_base);