projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
019d22e
)
fs/ntfs3: Eliminate unnecessary ternary operator in ntfs_d_compare()
author
Nathan Chancellor
<nathan@kernel.org>
Tue, 4 Oct 2022 23:23:59 +0000
(16:23 -0700)
committer
Konstantin Komarov
<almaz.alexandrovich@paragon-software.com>
Sat, 12 Nov 2022 17:59:42 +0000
(20:59 +0300)
'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>
fs/ntfs3/namei.c
patch
|
blob
|
history
diff --git
a/fs/ntfs3/namei.c
b/fs/ntfs3/namei.c
index 5d3a6ce3f05f4d508454e155631c030884bd69c5..6b0d2c01d6ffc3071ba562683efb8a314ed26f1a 100644
(file)
--- 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;