summaryrefslogtreecommitdiffstats
path: root/sbin/growfs/growfs.c
diff options
context:
space:
mode:
authorgavin <gavin@FreeBSD.org>2010-01-02 20:18:10 +0000
committergavin <gavin@FreeBSD.org>2010-01-02 20:18:10 +0000
commitddc8c3887ef93c3a5c3c419a68d7b3730fed0aea (patch)
treefa7bab3a9b95e652abbe220480872ef599355f0f /sbin/growfs/growfs.c
parent30f8fd80e59d3b8ff9caad8f30a49c7862fa1ea4 (diff)
downloadFreeBSD-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.c14
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);
OpenPOWER on IntegriCloud