summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2022-10-11 20:21:03 +0300
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2022-11-14 19:50:49 +0300
commit36963cf225f890f97fd84af0a82d323043edd0f1 (patch)
treea9c008169a7e539fdc7149be02badd415f7a4872
parentec5fc72013762500867c9cef96fed89dc7161832 (diff)
downloadlinux-36963cf225f890f97fd84af0a82d323043edd0f1.tar.gz
linux-36963cf225f890f97fd84af0a82d323043edd0f1.tar.bz2
linux-36963cf225f890f97fd84af0a82d323043edd0f1.zip
fs/ntfs3: Make if more readable
This way it looks better. Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
-rw-r--r--fs/ntfs3/record.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/ntfs3/record.c b/fs/ntfs3/record.c
index a952cd7aa7a4..defce6a5c8e1 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;
}