summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2001-12-30 19:26:28 +0000
committerthorpej <thorpej@NetBSD.org>2001-12-30 19:26:28 +0000
commite23f3d910495bbc6d031fe5b7d84ebfb1474b59a (patch)
treeaa12f484bff0817046a5a693087c8ac27fcff72e /lib/libc
parent6f2f5bdcc67a244dbda4aba91c8ef045ae920e5e (diff)
Fix -Wshadow warnings (gcc 3.1).
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/db/recno/rec_search.c18
-rw-r--r--lib/libc/gen/telldir.c16
2 files changed, 17 insertions, 17 deletions
diff --git a/lib/libc/db/recno/rec_search.c b/lib/libc/db/recno/rec_search.c
index e676eec6b34..de0bd58484c 100644
--- a/lib/libc/db/recno/rec_search.c
+++ b/lib/libc/db/recno/rec_search.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rec_search.c,v 1.9 1997/07/21 14:06:46 jtc Exp $ */
+/* $NetBSD: rec_search.c,v 1.10 2001/12/30 19:26:28 thorpej Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)rec_search.c 8.4 (Berkeley) 7/14/94";
#else
-__RCSID("$NetBSD: rec_search.c,v 1.9 1997/07/21 14:06:46 jtc Exp $");
+__RCSID("$NetBSD: rec_search.c,v 1.10 2001/12/30 19:26:28 thorpej Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -74,7 +74,7 @@ __rec_search(t, recno, op)
recno_t recno;
enum SRCHOP op;
{
- register indx_t index;
+ register indx_t idx;
register PAGE *h;
EPGNO *parent;
RINTERNAL *r;
@@ -92,23 +92,23 @@ __rec_search(t, recno, 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:
diff --git a/lib/libc/gen/telldir.c b/lib/libc/gen/telldir.c
index 276d844bce3..695d0afe5d6 100644
--- a/lib/libc/gen/telldir.c
+++ b/lib/libc/gen/telldir.c
@@ -1,4 +1,4 @@
-/* $NetBSD: telldir.c,v 1.12 2000/01/22 22:19:13 mycroft Exp $ */
+/* $NetBSD: telldir.c,v 1.13 2001/12/30 19:27:42 thorpej Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)telldir.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: telldir.c,v 1.12 2000/01/22 22:19:13 mycroft Exp $");
+__RCSID("$NetBSD: telldir.c,v 1.13 2001/12/30 19:27:42 thorpej Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -87,19 +87,19 @@ long
telldir(dirp)
const DIR *dirp;
{
- long index;
+ long idx;
struct ddloc *lp;
if ((lp = (struct ddloc *)malloc(sizeof(struct ddloc))) == NULL)
return (-1);
- index = dd_loccnt++;
- lp->loc_index = index;
+ idx = dd_loccnt++;
+ lp->loc_index = idx;
lp->loc_seek = dirp->dd_seek;
lp->loc_loc = dirp->dd_loc;
- lp->loc_next = dd_hash[LOCHASH(index)];
- dd_hash[LOCHASH(index)] = lp;
- return (index);
+ lp->loc_next = dd_hash[LOCHASH(idx)];
+ dd_hash[LOCHASH(idx)] = lp;
+ return (idx);
}
/*