summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/fsck_ffs/pass5.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/fsck_ffs/pass5.c b/sbin/fsck_ffs/pass5.c
index c3f6c3d..074dbf8 100644
--- a/sbin/fsck_ffs/pass5.c
+++ b/sbin/fsck_ffs/pass5.c
@@ -184,15 +184,15 @@ pass5(void)
newcg->cg_cs.cs_nffree = 0;
newcg->cg_cs.cs_nbfree = 0;
newcg->cg_cs.cs_nifree = fs->fs_ipg;
- if (cg->cg_rotor < newcg->cg_ndblk)
+ if ((cg->cg_rotor >= 0) && (cg->cg_rotor < newcg->cg_ndblk))
newcg->cg_rotor = cg->cg_rotor;
else
newcg->cg_rotor = 0;
- if (cg->cg_frotor < newcg->cg_ndblk)
+ if ((cg->cg_frotor >= 0) && (cg->cg_frotor < newcg->cg_ndblk))
newcg->cg_frotor = cg->cg_frotor;
else
newcg->cg_frotor = 0;
- if (cg->cg_irotor < fs->fs_ipg)
+ if ((cg->cg_irotor >= 0) && (cg->cg_irotor < fs->fs_ipg))
newcg->cg_irotor = cg->cg_irotor;
else
newcg->cg_irotor = 0;
OpenPOWER on IntegriCloud