aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/db/recno/rec_delete.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/db/recno/rec_delete.c')
-rw-r--r--lib/libc/db/recno/rec_delete.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/libc/db/recno/rec_delete.c b/lib/libc/db/recno/rec_delete.c
index f6ef4b4a16b9..d799da282ceb 100644
--- a/lib/libc/db/recno/rec_delete.c
+++ b/lib/libc/db/recno/rec_delete.c
@@ -138,16 +138,13 @@ rec_rdelete(BTREE *t, recno_t nrec)
*
* Parameters:
* t: tree
- * index: index on current page to delete
+ * idx: index on current page to delete
*
* Returns:
* RET_SUCCESS, RET_ERROR.
*/
int
-__rec_dleaf(t, h, index)
- BTREE *t;
- PAGE *h;
- u_int32_t index;
+__rec_dleaf(BTREE *t, PAGE *h, u_int32_t idx)
{
RLEAF *rl;
indx_t *ip, cnt, offset;
@@ -165,7 +162,7 @@ __rec_dleaf(t, h, index)
* down, overwriting the deleted record and its index. If the record
* uses overflow pages, make them available for reuse.
*/
- to = rl = GETRLEAF(h, index);
+ to = rl = GETRLEAF(h, idx);
if (rl->flags & P_BIGDATA && __ovfl_delete(t, rl->bytes) == RET_ERROR)
return (RET_ERROR);
nbytes = NRLEAF(rl);
@@ -178,8 +175,8 @@ __rec_dleaf(t, h, index)
memmove(from + nbytes, from, (char *)to - from);
h->upper += nbytes;
- offset = h->linp[index];
- for (cnt = &h->linp[index] - (ip = &h->linp[0]); cnt--; ++ip)
+ offset = h->linp[idx];
+ for (cnt = &h->linp[idx] - (ip = &h->linp[0]); cnt--; ++ip)
if (ip[0] < offset)
ip[0] += nbytes;
for (cnt = &h->linp[NEXTINDEX(h)] - ip; --cnt; ++ip)