diff options
author | Nathan Chancellor <nathan@kernel.org> | 2022-10-05 02:23:59 +0300 |
---|---|---|
committer | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2022-11-12 20:59:42 +0300 |
commit | 75b5e47201329537c8b88531a59aab2cbcec8d61 (patch) | |
tree | 906bdc77154640ffde7d7380abe9e3e5847468e5 /fs | |
parent | 019d22eb0eb707fc099e6e8fad9b3933236a06d0 (diff) | |
download | linux-75b5e47201329537c8b88531a59aab2cbcec8d61.tar.xz |
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')
-rw-r--r-- | fs/ntfs3/namei.c | 2 |
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; |