Commit 75b5e472 authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Konstantin Komarov

fs/ntfs3: Eliminate unnecessary ternary operator in ntfs_d_compare()

'a == b ? 0 : 1' is logically equivalent to 'a != b'.
Suggested-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
Signed-off-by: default avatarKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
parent 019d22eb
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment