aboutsummaryrefslogtreecommitdiff
path: root/sbin/fsirand/fsirand.c
diff options
context:
space:
mode:
authorAlexander Kabaev <kan@FreeBSD.org>2004-07-28 05:59:22 +0000
committerAlexander Kabaev <kan@FreeBSD.org>2004-07-28 05:59:22 +0000
commit8518a74a8f1a532d3b7e0e3616bea24303493f88 (patch)
tree272e3b86ec9bd86b7274f5c717e3ce1f3bf7ced0 /sbin/fsirand/fsirand.c
parentbcd5ceac5944c4c00608ebcb1f49f7b1e8e3eaac (diff)
downloadsrc-8518a74a8f1a532d3b7e0e3616bea24303493f88.tar.gz
src-8518a74a8f1a532d3b7e0e3616bea24303493f88.zip
Avoid casts as lvalues.
Notes
Notes: svn path=/head/; revision=132762
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();
}
}