diff options
author | kan <kan@FreeBSD.org> | 2004-07-28 05:59:22 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2004-07-28 05:59:22 +0000 |
commit | bce3675a338eb8fa4f1c54d14632925b7731d795 (patch) | |
tree | 272e3b86ec9bd86b7274f5c717e3ce1f3bf7ced0 /sbin/dump/traverse.c | |
parent | 8951be1606687f2757457c50aefbb28f021ea1bc (diff) | |
download | FreeBSD-src-bce3675a338eb8fa4f1c54d14632925b7731d795.zip FreeBSD-src-bce3675a338eb8fa4f1c54d14632925b7731d795.tar.gz |
Avoid casts as lvalues.
Diffstat (limited to 'sbin/dump/traverse.c')
-rw-r--r-- | sbin/dump/traverse.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sbin/dump/traverse.c b/sbin/dump/traverse.c index 332bc273..08e5e23 100644 --- a/sbin/dump/traverse.c +++ b/sbin/dump/traverse.c @@ -63,6 +63,12 @@ union dinode { #define DIP(dp, field) \ ((sblock->fs_magic == FS_UFS1_MAGIC) ? \ (dp)->dp1.field : (dp)->dp2.field) +#define DIP_SET(dp, field, val) do {\ + if (sblock->fs_magic == FS_UFS1_MAGIC) \ + (dp)->dp1.field = (val); \ + else \ + (dp)->dp2.field = (val); \ + } while (0) #define HASDUMPEDFILE 0x1 #define HASSUBDIRS 0x2 @@ -446,8 +452,8 @@ dumpino(union dinode *dp, ino_t ino) * as a zero length file. */ if ((DIP(dp, di_flags) & SF_SNAPSHOT) != 0) { - DIP(dp, di_size) = 0; - DIP(dp, di_flags) &= ~SF_SNAPSHOT; + DIP_SET(dp, di_size, 0); + DIP_SET(dp, di_flags, DIP(dp, di_flags) & ~SF_SNAPSHOT); } if (sblock->fs_magic == FS_UFS1_MAGIC) { spcl.c_mode = dp->dp1.di_mode; |