aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2021-02-12 00:10:06 -0500
committerTheodore Ts'o <tytso@mit.edu>2021-02-12 00:10:06 -0500
commit46fcf7087b557ad3ba18af4996a1cb9ded7c43b5 (patch)
tree5e180da877d806b9f99982576cf0e41786c32277
parentea41284998daf106f96112ae3d66226233e86f5a (diff)
downloade2fsprogs-46fcf7087b557ad3ba18af4996a1cb9ded7c43b5.tar.gz
ext2_fs.h: use the ext2fs_has_feature_64bits() instead of open coded check
This makes the code a bit cleaner and fixes a false positive warning by Coverity. (CID #1464576) Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r--lib/ext2fs/ext2_fs.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/ext2fs/ext2_fs.h b/lib/ext2fs/ext2_fs.h
index 770a5ad3d..e92a04520 100644
--- a/lib/ext2fs/ext2_fs.h
+++ b/lib/ext2fs/ext2_fs.h
@@ -269,8 +269,7 @@ struct ext2_dx_tail {
#define EXT2_MIN_DESC_SIZE_64BIT 64
#define EXT2_MAX_DESC_SIZE EXT2_MIN_BLOCK_SIZE
#define EXT2_DESC_SIZE(s) \
- ((EXT2_SB(s)->s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT) ? \
- (s)->s_desc_size : EXT2_MIN_DESC_SIZE)
+ (ext2fs_has_feature_64bit(s) ? (s)->s_desc_size : EXT2_MIN_DESC_SIZE)
#define EXT2_BLOCKS_PER_GROUP(s) (EXT2_SB(s)->s_blocks_per_group)
#define EXT2_INODES_PER_GROUP(s) (EXT2_SB(s)->s_inodes_per_group)