aboutsummaryrefslogtreecommitdiff
path: root/sbin/fsirand/fsirand.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/fsirand/fsirand.c')
-rw-r--r--sbin/fsirand/fsirand.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/fsirand/fsirand.c b/sbin/fsirand/fsirand.c
index 7b6274fb64e7..defdf5250d33 100644
--- a/sbin/fsirand/fsirand.c
+++ b/sbin/fsirand/fsirand.c
@@ -274,9 +274,10 @@ fsirand(char *device)
inumber,
sblock->fs_magic == FS_UFS1_MAGIC ?
(quad_t)dp1->di_gen : dp2->di_gen);
+ else if (sblock->fs_magic == FS_UFS1_MAGIC)
+ dp1->di_gen = random();
else
- (sblock->fs_magic == FS_UFS1_MAGIC ?
- dp1->di_gen : dp2->di_gen) = random();
+ dp2->di_gen = random();
}
}