未验证 提交 75b5e472 编写于 作者: N Nathan Chancellor 提交者: Konstantin Komarov

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

'a == b ? 0 : 1' is logically equivalent to 'a != b'.
Suggested-by: NNick Desaulniers <ndesaulniers@google.com>
Signed-off-by: NNathan Chancellor <nathan@kernel.org>
Signed-off-by: NKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
上级 019d22eb
...@@ -432,7 +432,7 @@ static int ntfs_d_compare(const struct dentry *dentry, unsigned int len1, ...@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册