mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-20 05:18:21 +08:00
mdbx: add unlikely
for comparison result inside mdbx_cursor_set().
This commit is contained in:
parent
51b89c9690
commit
3c87e02716
@ -7154,10 +7154,9 @@ static int mdbx_cursor_set(MDBX_cursor *mc, MDBX_val *key, MDBX_val *data,
|
||||
MDBX_GET_KEY2(leaf, nodekey);
|
||||
}
|
||||
rc = mc->mc_dbx->md_cmp(key, &nodekey);
|
||||
if (rc == 0) {
|
||||
if (unlikely(rc == 0)) {
|
||||
/* Probably happens rarely, but first node on the page
|
||||
* was the one we wanted.
|
||||
*/
|
||||
* was the one we wanted. */
|
||||
mc->mc_ki[mc->mc_top] = 0;
|
||||
if (exactp)
|
||||
*exactp = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user