From 04d55554369808ec8a2cc23dc15ecbdf24387c29 Mon Sep 17 00:00:00 2001 From: lukem Date: Fri, 2 Nov 2001 05:33:21 +0000 Subject: [PATCH] fix -Wshadow warning --- sbin/fsck_lfs/pass0.c | 18 +++++++++--------- sbin/ping6/ping6.c | 12 ++++++------ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/sbin/fsck_lfs/pass0.c b/sbin/fsck_lfs/pass0.c index 7fc485489dda..d2b81cd7a4cf 100644 --- a/sbin/fsck_lfs/pass0.c +++ b/sbin/fsck_lfs/pass0.c @@ -1,4 +1,4 @@ -/* $NetBSD: pass0.c,v 1.9 2001/07/13 20:30:19 perseant Exp $ */ +/* $NetBSD: pass0.c,v 1.10 2001/11/02 05:39:10 lukem Exp $ */ /* * Copyright (c) 1998 Konrad E. Schroder. @@ -76,7 +76,7 @@ pass0() daddr_t daddr; IFILE *ifp; struct bufarea *bp; - ino_t ino, lastino, nextino, *visited; + ino_t ino, plastino, nextino, *visited; /* * Check the inode free list for inuse inodes, and cycles. @@ -85,20 +85,20 @@ pass0() visited = (ino_t *)malloc(maxino * sizeof(ino_t)); memset(visited, 0, maxino * sizeof(ino_t)); - lastino = 0; + plastino = 0; ino = sblock.lfs_free; while (ino) { if (ino >= maxino) { printf("! Ino %d out of range (last was %d)\n", ino, - lastino); + plastino); break; } if (visited[ino]) { pwarn("! Ino %d already found on the free list!\n", ino); if (preen || reply("FIX") == 1) { - /* lastino can't be zero */ - ifp = lfs_ientry(lastino, &bp); + /* plastino can't be zero */ + ifp = lfs_ientry(plastino, &bp); ifp->if_nextfree = 0; dirty(bp); bp->b_flags &= ~B_INUSE; @@ -114,11 +114,11 @@ pass0() pwarn("! Ino %d with daddr 0x%x is on the free list!\n", ino, daddr); if (preen || reply("FIX") == 1) { - if (lastino == 0) { + if (plastino == 0) { sblock.lfs_free = nextino; sbdirty(); } else { - ifp = lfs_ientry(lastino, &bp); + ifp = lfs_ientry(plastino, &bp); ifp->if_nextfree = nextino; dirty(bp); bp->b_flags &= ~B_INUSE; @@ -127,7 +127,7 @@ pass0() continue; } } - lastino = ino; + plastino = ino; ino = nextino; } /* diff --git a/sbin/ping6/ping6.c b/sbin/ping6/ping6.c index 7135b5e8017d..f874001c1822 100644 --- a/sbin/ping6/ping6.c +++ b/sbin/ping6/ping6.c @@ -1,4 +1,4 @@ -/* $NetBSD: ping6.c,v 1.37 2001/08/19 01:21:42 itojun Exp $ */ +/* $NetBSD: ping6.c,v 1.38 2001/11/02 05:33:21 lukem Exp $ */ /* $KAME: ping6.c,v 1.129 2001/06/22 13:16:02 itojun Exp $ */ /* @@ -81,7 +81,7 @@ static char sccsid[] = "@(#)ping.c 8.1 (Berkeley) 6/5/93"; #else #include #ifndef lint -__RCSID("$NetBSD: ping6.c,v 1.37 2001/08/19 01:21:42 itojun Exp $"); +__RCSID("$NetBSD: ping6.c,v 1.38 2001/11/02 05:33:21 lukem Exp $"); #endif #endif @@ -1816,9 +1816,9 @@ pr_rthdr(void *extbuf) #endif /* USE_RFC2292BIS */ int -pr_bitrange(v, s, ii) +pr_bitrange(v, soff, ii) u_int32_t v; - int s; + int soff; int ii; { int off; @@ -1829,7 +1829,7 @@ pr_bitrange(v, s, ii) /* shift till we have 0x01 */ if ((v & 0x01) == 0) { if (ii > 1) - printf("-%u", s + off - 1); + printf("-%u", soff + off - 1); ii = 0; switch (v & 0x0f) { case 0x00: @@ -1857,7 +1857,7 @@ pr_bitrange(v, s, ii) break; } if (!ii) - printf(" %u", s + off); + printf(" %u", soff + off); ii += i; v >>= i; off += i; }