mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
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:
parent
019d22eb0e
commit
75b5e47201
@ -432,7 +432,7 @@ static int ntfs_d_compare(const struct dentry *dentry, unsigned int len1,
|
|||||||
/* First try fast implementation. */
|
/* First try fast implementation. */
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (!lm--)
|
if (!lm--)
|
||||||
return len1 == len2 ? 0 : 1;
|
return len1 != len2;
|
||||||
|
|
||||||
if ((c1 = *n1++) == (c2 = *n2++))
|
if ((c1 = *n1++) == (c2 = *n2++))
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user