summaryrefslogtreecommitdiff
path: root/fs/ntfs3/namei.c
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2022-10-04 16:23:59 -0700
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>2022-11-12 20:59:42 +0300
commit75b5e47201329537c8b88531a59aab2cbcec8d61 (patch)
tree906bdc77154640ffde7d7380abe9e3e5847468e5 /fs/ntfs3/namei.c
parent019d22eb0eb707fc099e6e8fad9b3933236a06d0 (diff)
fs/ntfs3: Eliminate unnecessary ternary operator in ntfs_d_compare()
'a == b ? 0 : 1' is logically equivalent to 'a != b'. Suggested-by: Nick Desaulniers <ndesaulniers@google.com> Signed-off-by: Nathan Chancellor <nathan@kernel.org> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs/ntfs3/namei.c')
-rw-r--r--fs/ntfs3/namei.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ntfs3/namei.c b/fs/ntfs3/namei.c
index 5d3a6ce3f05f..6b0d2c01d6ff 100644
--- a/fs/ntfs3/namei.c
+++ b/fs/ntfs3/namei.c
@@ -432,7 +432,7 @@ static int ntfs_d_compare(const struct dentry *dentry, unsigned int len1,
/* First try fast implementation. */
for (;;) {
if (!lm--)
- return len1 == len2 ? 0 : 1;
+ return len1 != len2;
if ((c1 = *n1++) == (c2 = *n2++))
continue;