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_search.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_search.c')
-rw-r--r-- | lib/libc/db/recno/rec_search.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/libc/db/recno/rec_search.c b/lib/libc/db/recno/rec_search.c index 61bcb75..68e7f2d 100644 --- a/lib/libc/db/recno/rec_search.c +++ b/lib/libc/db/recno/rec_search.c @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); EPG * __rec_search(BTREE *t, recno_t recno, enum SRCHOP op) { - indx_t index; + indx_t idx; PAGE *h; EPGNO *parent; RINTERNAL *r; @@ -79,23 +79,23 @@ __rec_search(BTREE *t, recno_t recno, enum SRCHOP op) t->bt_cur.index = recno - total; return (&t->bt_cur); } - for (index = 0, top = NEXTINDEX(h);;) { - r = GETRINTERNAL(h, index); - if (++index == top || total + r->nrecs > recno) + for (idx = 0, top = NEXTINDEX(h);;) { + r = GETRINTERNAL(h, idx); + if (++idx == top || total + r->nrecs > recno) break; total += r->nrecs; } - BT_PUSH(t, pg, index - 1); + BT_PUSH(t, pg, idx - 1); pg = r->pgno; switch (op) { case SDELETE: - --GETRINTERNAL(h, (index - 1))->nrecs; + --GETRINTERNAL(h, (idx - 1))->nrecs; mpool_put(t->bt_mp, h, MPOOL_DIRTY); break; case SINSERT: - ++GETRINTERNAL(h, (index - 1))->nrecs; + ++GETRINTERNAL(h, (idx - 1))->nrecs; mpool_put(t->bt_mp, h, MPOOL_DIRTY); break; case SEARCH: |