mdbx: more unlikely (minor).

Change-Id: I9052d89d4b297615af199a0e2f468cda1482297a
This commit is contained in:
Leonid Yuriev 2020-01-04 15:42:16 +03:00
parent 9de65acf3e
commit f282ae45e0

View File

@ -10954,7 +10954,7 @@ int mdbx_cursor_put(MDBX_cursor *mc, MDBX_val *key, MDBX_val *data,
if (IS_LEAF2(mc->mc_pg[mc->mc_top])) {
char *ptr;
unsigned ksize = mc->mc_db->md_xsize;
if (key->iov_len != ksize)
if (unlikely(key->iov_len != ksize))
return MDBX_BAD_VALSIZE;
ptr = page_leaf2key(mc->mc_pg[mc->mc_top], mc->mc_ki[mc->mc_top], ksize);
memcpy(ptr, key->iov_base, ksize);