mdbx: minor refine node_search().

Change-Id: Ib9aaca3e7853b9986b6d70bc43a88e90d0a46c0c
This commit is contained in:
Leonid Yuriev 2021-02-05 14:31:33 +03:00
parent 892402a5d8
commit 0e8c913c57

View File

@ -12353,9 +12353,9 @@ static MDBX_node *__hot mdbx_node_search(MDBX_cursor *mc, const MDBX_val *key,
: /* There is no entry larger or equal to the key. */ NULL;
}
if (cmp == cmp_int_align2 && IS_BRANCH(mp))
if (IS_BRANCH(mp) && cmp == cmp_int_align2)
/* Branch pages have no data, so if using integer keys,
* alignment is guaranteed. Use faster mdbx_cmp_int_align4(). */
* alignment is guaranteed. Use faster cmp_int_align4(). */
cmp = cmp_int_align4;
MDBX_node *node;