Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin fix -Wshadow warning



details:   https://anonhg.NetBSD.org/src/rev/ee0654c4c43d
branches:  trunk
changeset: 516933:ee0654c4c43d
user:      lukem <lukem%NetBSD.org@localhost>
date:      Fri Nov 02 05:33:21 2001 +0000

description:
fix -Wshadow warning

diffstat:

 sbin/fsck_lfs/pass0.c |  18 +++++++++---------
 sbin/ping6/ping6.c    |  12 ++++++------
 2 files changed, 15 insertions(+), 15 deletions(-)

diffs (114 lines):

diff -r ad144435f33c -r ee0654c4c43d sbin/fsck_lfs/pass0.c
--- a/sbin/fsck_lfs/pass0.c     Fri Nov 02 05:30:56 2001 +0000
+++ b/sbin/fsck_lfs/pass0.c     Fri Nov 02 05:33:21 2001 +0000
@@ -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 @@
        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 @@
        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 @@
                        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 @@
                                continue;
                        }
                }
-               lastino = ino;
+               plastino = ino;
                ino = nextino;
        }
        /*
diff -r ad144435f33c -r ee0654c4c43d sbin/ping6/ping6.c
--- a/sbin/ping6/ping6.c        Fri Nov 02 05:30:56 2001 +0000
+++ b/sbin/ping6/ping6.c        Fri Nov 02 05:33:21 2001 +0000
@@ -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 @@
 #else
 #include <sys/cdefs.h>
 #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 @@
 #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 @@
                /* 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 @@
                                break;
                }
                if (!ii)
-                       printf(" %u", s + off);
+                       printf(" %u", soff + off);
                ii += i;
                v >>= i; off += i;
        }



Home | Main Index | Thread Index | Old Index