fs/ntfs3: Make if more readable
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Tue, 11 Oct 2022 17:21:03 +0000 (20:21 +0300)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Mon, 14 Nov 2022 16:50:49 +0000 (19:50 +0300)
This way it looks better.

Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3/record.c

index a952cd7..defce6a 100644 (file)
@@ -265,10 +265,9 @@ struct ATTRIB *mi_enum_attr(struct mft_inode *mi, struct ATTRIB *attr)
                if (t16 + t32 > asize)
                        return NULL;
 
-               if (attr->name_len &&
-                   le16_to_cpu(attr->name_off) + sizeof(short) * attr->name_len > t16) {
+               t32 = sizeof(short) * attr->name_len;
+               if (t32 && le16_to_cpu(attr->name_off) + t32 > t16)
                        return NULL;
-               }
 
                return attr;
        }