diff options
author | delphij <delphij@FreeBSD.org> | 2009-03-03 02:16:12 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2009-03-03 02:16:12 +0000 |
commit | f90b85d3baf78e6fb1f342779678c053356c3f10 (patch) | |
tree | e43f113728d88c5ddee8f31f68f971a133ef892f /lib/libc/db/recno/rec_delete.c | |
parent | 7fd77a056c7750353e5b351f39749ba813255b32 (diff) | |
download | FreeBSD-src-f90b85d3baf78e6fb1f342779678c053356c3f10.zip FreeBSD-src-f90b85d3baf78e6fb1f342779678c053356c3f10.tar.gz |
Rename variable 'index' to 'idx' to avoid name collision with index(3),
this commit does not affect any object code.
Obtained from: OpenBSD
Verified with: md5(1)
Diffstat (limited to 'lib/libc/db/recno/rec_delete.c')
-rw-r--r-- | lib/libc/db/recno/rec_delete.c | 13 |
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 f6ef4b4..d799da2 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) |