aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/db/btree/bt_search.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/db/btree/bt_search.c')
-rw-r--r--lib/libc/db/btree/bt_search.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libc/db/btree/bt_search.c b/lib/libc/db/btree/bt_search.c
index 73c0ffe23b0b..15ef1fa81af2 100644
--- a/lib/libc/db/btree/bt_search.c
+++ b/lib/libc/db/btree/bt_search.c
@@ -64,7 +64,7 @@ EPG *
__bt_search(BTREE *t, const DBT *key, int *exactp)
{
PAGE *h;
- indx_t base, index, lim;
+ indx_t base, idx, lim;
pgno_t pg;
int cmp;
@@ -76,7 +76,7 @@ __bt_search(BTREE *t, const DBT *key, int *exactp)
/* Do a binary search on the current page. */
t->bt_cur.page = h;
for (base = 0, lim = NEXTINDEX(h); lim; lim >>= 1) {
- t->bt_cur.index = index = base + (lim >> 1);
+ t->bt_cur.index = idx = base + (lim >> 1);
if ((cmp = __bt_cmp(t, key, &t->bt_cur)) == 0) {
if (h->flags & P_BLEAF) {
*exactp = 1;
@@ -85,7 +85,7 @@ __bt_search(BTREE *t, const DBT *key, int *exactp)
goto next;
}
if (cmp > 0) {
- base = index + 1;
+ base = idx + 1;
--lim;
}
}
@@ -121,10 +121,10 @@ __bt_search(BTREE *t, const DBT *key, int *exactp)
* be a parent page for the key. If a split later occurs, the
* inserted page will be to the right of the saved page.
*/
- index = base ? base - 1 : base;
+ idx = base ? base - 1 : base;
-next: BT_PUSH(t, h->pgno, index);
- pg = GETBINTERNAL(h, index)->pgno;
+next: BT_PUSH(t, h->pgno, idx);
+ pg = GETBINTERNAL(h, idx)->pgno;
mpool_put(t->bt_mp, h, 0);
}
}