From: Konstantin Komarov Date: Tue, 11 Oct 2022 17:21:03 +0000 (+0300) Subject: fs/ntfs3: Make if more readable X-Git-Tag: v6.6.17~5855^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=36963cf225f890f97fd84af0a82d323043edd0f1;p=platform%2Fkernel%2Flinux-rpi.git fs/ntfs3: Make if more readable This way it looks better. Signed-off-by: Konstantin Komarov --- diff --git a/fs/ntfs3/record.c b/fs/ntfs3/record.c index a952cd7..defce6a 100644 --- a/fs/ntfs3/record.c +++ b/fs/ntfs3/record.c @@ -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; }