From 46fcf7087b557ad3ba18af4996a1cb9ded7c43b5 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Fri, 12 Feb 2021 00:10:06 -0500 Subject: [PATCH] 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 --- lib/ext2fs/ext2_fs.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ext2fs/ext2_fs.h b/lib/ext2fs/ext2_fs.h index 770a5ad..e92a045 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) -- 1.8.3.1