diff options
author | gavin <gavin@FreeBSD.org> | 2010-01-02 20:18:10 +0000 |
---|---|---|
committer | gavin <gavin@FreeBSD.org> | 2010-01-02 20:18:10 +0000 |
commit | ddc8c3887ef93c3a5c3c419a68d7b3730fed0aea (patch) | |
tree | fa7bab3a9b95e652abbe220480872ef599355f0f /sbin/growfs/growfs.c | |
parent | 30f8fd80e59d3b8ff9caad8f30a49c7862fa1ea4 (diff) | |
download | FreeBSD-src-ddc8c3887ef93c3a5c3c419a68d7b3730fed0aea.zip FreeBSD-src-ddc8c3887ef93c3a5c3c419a68d7b3730fed0aea.tar.gz |
Remove dead code. This section of code is only run in the
(sblock.fs_magic == FS_UFS1_MAGIC) case, so the check within the
loop is redundant.
Submitted by: Nate Eldredge nge cs.hmc.edu
Reviewed by: mjacob
Approved by: ed (mentor)
MFC after: 1 month
Diffstat (limited to 'sbin/growfs/growfs.c')
-rw-r--r-- | sbin/growfs/growfs.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sbin/growfs/growfs.c b/sbin/growfs/growfs.c index 96b5c6c..ee37a88 100644 --- a/sbin/growfs/growfs.c +++ b/sbin/growfs/growfs.c @@ -376,7 +376,6 @@ initcg(int cylno, time_t utime, int fso, unsigned int Nflag) long d, dlower, dupper, blkno, start; ufs2_daddr_t i, cbase, dmax; struct ufs1_dinode *dp1; - struct ufs2_dinode *dp2; struct csum *cs; if (iobuf == NULL && (iobuf = malloc(sblock.fs_bsize)) == NULL) { @@ -460,16 +459,11 @@ initcg(int cylno, time_t utime, int fso, unsigned int Nflag) for (i = 2 * sblock.fs_frag; i < sblock.fs_ipg / INOPF(&sblock); i += sblock.fs_frag) { dp1 = (struct ufs1_dinode *)iobuf; - dp2 = (struct ufs2_dinode *)iobuf; #ifdef FSIRAND - for (j = 0; j < INOPB(&sblock); j++) - if (sblock.fs_magic == FS_UFS1_MAGIC) { - dp1->di_gen = random(); - dp1++; - } else { - dp2->di_gen = random(); - dp2++; - } + for (j = 0; j < INOPB(&sblock); j++) { + dp1->di_gen = random(); + dp1++; + } #endif wtfs(fsbtodb(&sblock, cgimin(&sblock, cylno) + i), sblock.fs_bsize, iobuf, fso, Nflag); |