From ea1fcc22466df4fac0fa8ef48e07869fba03aebd Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Thu, 27 May 2021 11:19:32 +0300 Subject: [PATCH] mdbx: fix insignificantly Coverity warnings. --- src/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core.c b/src/core.c index d388b5f9..500e481c 100644 --- a/src/core.c +++ b/src/core.c @@ -4155,7 +4155,7 @@ static MDBX_page *mdbx_page_malloc(MDBX_txn *txn, unsigned num) { static void mdbx_dpage_free(MDBX_env *env, MDBX_page *dp, unsigned npages) { VALGRIND_MAKE_MEM_UNDEFINED(dp, pgno2bytes(env, npages)); ASAN_UNPOISON_MEMORY_REGION(dp, pgno2bytes(env, npages)); - if (MDBX_DEBUG || unlikely(env->me_flags & MDBX_PAGEPERTURB)) + if (MDBX_DEBUG != 0 || unlikely(env->me_flags & MDBX_PAGEPERTURB)) memset(dp, -1, pgno2bytes(env, npages)); if (npages == 1 && env->me_dp_reserve_len < env->me_options.dp_reserve_limit) { @@ -4742,7 +4742,7 @@ status_done: ? pgno + 2 : txn->tw.loose_refund_wl; #endif /* MDBX_ENABLE_REFUND */ - if (MDBX_DEBUG || unlikely(txn->mt_env->me_flags & MDBX_PAGEPERTURB)) + if (MDBX_DEBUG != 0 || unlikely(txn->mt_env->me_flags & MDBX_PAGEPERTURB)) memset(page_data(mp), -1, txn->mt_env->me_psize - PAGEHDRSZ); VALGRIND_MAKE_MEM_NOACCESS(page_data(mp), txn->mt_env->me_psize - PAGEHDRSZ); @@ -4770,7 +4770,7 @@ status_done: } #if defined(MDBX_USE_VALGRIND) || defined(__SANITIZE_ADDRESS__) - if (MDBX_DEBUG || unlikely(txn->mt_env->me_flags & MDBX_PAGEPERTURB)) + if (MDBX_DEBUG != 0 || unlikely(txn->mt_env->me_flags & MDBX_PAGEPERTURB)) #endif mdbx_kill_page(txn, mp, pgno, npages); if (!(txn->mt_flags & MDBX_WRITEMAP)) {