From 9511bc491a2cc730e74e5df2b584dd96cc17beb0 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Thu, 30 Dec 2021 19:40:22 +0300 Subject: [PATCH] mdbx: more `unlikely()`. --- src/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core.c b/src/core.c index 7edb8755..8d534f16 100644 --- a/src/core.c +++ b/src/core.c @@ -14396,7 +14396,7 @@ int mdbx_cursor_get(MDBX_cursor *mc, MDBX_val *key, MDBX_val *data, return MDBX_ENODATA; MDBX_page *mp = mc->mc_pg[mc->mc_top]; const unsigned nkeys = page_numkeys(mp); - if (mc->mc_ki[mc->mc_top] >= nkeys) { + if (unlikely(mc->mc_ki[mc->mc_top] >= nkeys)) { mdbx_cassert(mc, nkeys <= UINT16_MAX); if (mc->mc_flags & C_EOF) return MDBX_ENODATA;