From: Theodore Ts'o Date: Fri, 12 Feb 2021 05:10:06 +0000 (-0500) Subject: ext2_fs.h: use the ext2fs_has_feature_64bits() instead of open coded check X-Git-Tag: v1.46.2~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=46fcf7087b557ad3ba18af4996a1cb9ded7c43b5;p=thirdparty%2Fe2fsprogs.git 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 --- 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)