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>
This commit is contained in:
Nathan Chancellor 2022-10-04 16:23:59 -07:00 committed by Konstantin Komarov
parent 019d22eb0e
commit 75b5e47201
No known key found for this signature in database
GPG Key ID: A9B0331F832407B6

View File

@ -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;