From 5aeb7ccf25e39177a574771af51d894a866a95a8 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Tue, 1 Feb 2022 16:05:38 +0300 Subject: [PATCH] mdbx: fix extra casting inside `mdbx_limits_dbsize_max()`. --- src/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core.c b/src/core.c index 0911eca5..22f6f05d 100644 --- a/src/core.c +++ b/src/core.c @@ -21861,8 +21861,7 @@ __cold intptr_t mdbx_limits_dbsize_max(intptr_t pagesize) { STATIC_ASSERT(MAX_MAPSIZE < INTPTR_MAX); const uint64_t limit = (1 + (uint64_t)MAX_PAGENO) * pagesize; - return (limit < (intptr_t)MAX_MAPSIZE) ? (intptr_t)limit - : (intptr_t)MAX_MAPSIZE; + return (limit < MAX_MAPSIZE) ? (intptr_t)limit : (intptr_t)MAX_MAPSIZE; } __cold intptr_t mdbx_limits_txnsize_max(intptr_t pagesize) {