mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
more for mdb_cursor_count
return MDB_NOTFOUND if the cursor is empty
This commit is contained in:
parent
6cb1166635
commit
082bac1492
@ -6962,6 +6962,9 @@ mdb_cursor_count(MDB_cursor *mc, size_t *countp)
|
||||
if (!(mc->mc_flags & C_INITIALIZED))
|
||||
return EINVAL;
|
||||
|
||||
if (!mc->mc_snum || (mc->mc_flags & C_EOF))
|
||||
return MDB_NOTFOUND;
|
||||
|
||||
leaf = NODEPTR(mc->mc_pg[mc->mc_top], mc->mc_ki[mc->mc_top]);
|
||||
if (!F_ISSET(leaf->mn_flags, F_DUPDATA)) {
|
||||
*countp = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user