Source-Changes-HG archive

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

[src/trunk]: src/sbin/newfs clean up for WARNS=2 by renaming some local varia...



details:   https://anonhg.NetBSD.org/src/rev/389507216d48
branches:  trunk
changeset: 513248:389507216d48
user:      lukem <lukem%NetBSD.org@localhost>
date:      Thu Jul 26 22:59:57 2001 +0000

description:
clean up for WARNS=2 by renaming some local variables that shadow globals

diffstat:

 sbin/newfs/mkfs.c |  24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diffs (78 lines):

diff -r 0a5079d21032 -r 389507216d48 sbin/newfs/mkfs.c
--- a/sbin/newfs/mkfs.c Thu Jul 26 22:55:12 2001 +0000
+++ b/sbin/newfs/mkfs.c Thu Jul 26 22:59:57 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mkfs.c,v 1.44 2001/07/26 16:53:39 lukem Exp $  */
+/*     $NetBSD: mkfs.c,v 1.45 2001/07/26 22:59:57 lukem Exp $  */
 
 /*
  * Copyright (c) 1980, 1989, 1993
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)mkfs.c     8.11 (Berkeley) 5/3/95";
 #else
-__RCSID("$NetBSD: mkfs.c,v 1.44 2001/07/26 16:53:39 lukem Exp $");
+__RCSID("$NetBSD: mkfs.c,v 1.45 2001/07/26 22:59:57 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -984,7 +984,7 @@
  * Calculate number of inodes per group.
  */
 int32_t
-calcipg(int32_t cpg, int32_t bpcg, off_t *usedbp)
+calcipg(int32_t cylpg, int32_t bpcg, off_t *usedbp)
 {
        int i;
        int32_t ipg, new_ipg, ncg, ncyl;
@@ -998,7 +998,7 @@
         * Note that fssize is still in sectors, not filesystem blocks.
         */
        ncyl = howmany(fssize, secpercyl);
-       ncg = howmany(ncyl, cpg);
+       ncg = howmany(ncyl, cylpg);
        /*
         * Iterate a few times to allow for ipg depending on itself.
         */
@@ -1006,8 +1006,8 @@
        for (i = 0; i < 10; i++) {
                usedb = (sblock.fs_iblkno + ipg / INOPF(&sblock))
                        * NSPF(&sblock) * (off_t)sectorsize;
-               new_ipg = (cpg * (quad_t)bpcg - usedb) / density * fssize
-                         / ncg / secpercyl / cpg;
+               new_ipg = (cylpg * (quad_t)bpcg - usedb) / density * fssize
+                         / ncg / secpercyl / cylpg;
                new_ipg = roundup(new_ipg, INOPB(&sblock));
                if (new_ipg == ipg)
                        break;
@@ -1023,7 +1023,7 @@
 static void
 iput(struct dinode *ip, ino_t ino)
 {
-       struct dinode buf[MAXINOPB];
+       struct dinode ibuf[MAXINOPB];
        daddr_t d;
        int c, i;
 
@@ -1050,16 +1050,16 @@
                exit(32);
        }
        d = fsbtodb(&sblock, ino_to_fsba(&sblock, ino));
-       rdfs(d, sblock.fs_bsize, buf);
+       rdfs(d, sblock.fs_bsize, ibuf);
        if (needswap) {
-               ffs_dinode_swap(ip, &buf[ino_to_fsbo(&sblock, ino)]);
+               ffs_dinode_swap(ip, &ibuf[ino_to_fsbo(&sblock, ino)]);
                /* ffs_dinode_swap() doesn't swap blocks addrs */
                for (i=0; i<NDADDR + NIADDR; i++)
-                       (&buf[ino_to_fsbo(&sblock, ino)])->di_db[i] = 
+                       (&ibuf[ino_to_fsbo(&sblock, ino)])->di_db[i] = 
                                bswap32(ip->di_db[i]);
        } else
-               buf[ino_to_fsbo(&sblock, ino)] = *ip;
-       wtfs(d, sblock.fs_bsize, buf);
+               ibuf[ino_to_fsbo(&sblock, ino)] = *ip;
+       wtfs(d, sblock.fs_bsize, ibuf);
 }
 
 /*



Home | Main Index | Thread Index | Old Index