Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nadezhda Ivanova
OpenLDAP
Commits
6ad29167
Commit
6ad29167
authored
Mar 14, 2021
by
Howard Chu
Browse files
ITS#9376 simplify
parent
99730069
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/liblmdb/mdb.c
View file @
6ad29167
...
@@ -10190,7 +10190,6 @@ mdb_cursor_del0(MDB_cursor *mc)
...
@@ -10190,7 +10190,6 @@ mdb_cursor_del0(MDB_cursor *mc)
return rc;
return rc;
}
}
ki = mc->mc_ki[mc->mc_top];
mp = mc->mc_pg[mc->mc_top];
mp = mc->mc_pg[mc->mc_top];
nkeys = NUMKEYS(mp);
nkeys = NUMKEYS(mp);
...
@@ -10202,19 +10201,18 @@ mdb_cursor_del0(MDB_cursor *mc)
...
@@ -10202,19 +10201,18 @@ mdb_cursor_del0(MDB_cursor *mc)
if (m3->mc_snum < mc->mc_snum)
if (m3->mc_snum < mc->mc_snum)
continue;
continue;
if (m3->mc_pg[mc->mc_top] == mp) {
if (m3->mc_pg[mc->mc_top] == mp) {
if (m3->mc_ki[mc->mc_top] >= mc->mc_ki[mc->mc_top]) {
/* if m3 points past last node in page, find next sibling */
/* if m3 points past last node in page, find next sibling */
if (m3->mc_ki[mc->mc_top] >= nkeys) {
if (m3->mc_ki[mc->mc_top] >= nkeys) {
rc = mdb_cursor_sibling(m3, 1);
rc = mdb_cursor_sibling(m3, 1);
if (rc == MDB_NOTFOUND) {
if (rc == MDB_NOTFOUND) {
m3->mc_flags |= C_EOF;
m3->mc_flags |= C_EOF;
rc = MDB_SUCCESS;
rc = MDB_SUCCESS;
continue;
continue;
}
if (rc)
goto fail;
}
}
if (rc)
goto fail;
}
if (m3->mc_ki[mc->mc_top] >= ki ||
/* moved to right sibling */ m3->mc_pg[mc->mc_top] != mp) {
if (m3->mc_xcursor && !(m3->mc_flags & C_EOF)) {
if (m3->mc_xcursor && !(m3->mc_flags & C_EOF)) {
MDB_node *node = NODEPTR(m3->mc_pg[m3->mc_top], m3->mc_ki[m3->mc_top]);
MDB_node *node = NODEPTR(m3->mc_pg[m3->mc_top], m3->mc_ki[m3->mc_top]);
/* If this node has dupdata, it may need to be reinited
/* If this node has dupdata, it may need to be reinited
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment