diff options
| author | Nathan Chancellor <[email protected]> | 2018-09-25 12:13:26 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2018-09-28 14:30:51 +0200 |
| commit | 6b9e49b25e79ddbbbe68ca81334424841d89606b (patch) | |
| tree | 11c1036a7a79e40da81084888bc00d7c5c39420a /tools/perf/scripts/python/bin | |
| parent | 9f902b495b537e7e940e002297251e0525292139 (diff) | |
staging: rtl8188eu: Simplify memcmp logical checks
Clang generates a warning when it sees a logical not followed by a
conditional operator like ==, >, or < because it thinks that the logical
not should be applied to the whole statement:
drivers/staging/rtl8188eu/core/rtw_ieee80211.c:293:8: warning: logical
not is only applied to the left hand side of this comparison
[-Wlogical-not-parentheses]
It assumes the author might have made a mistake in their logic:
if (!a == b) -> if (!(a == b))
Sometimes that is the case; other times, it's just a super convoluted
way of saying 'if (a)' when b = 0:
if (!1 == 0) -> if (0 == 0) -> if (true)
Alternatively:
if (!1 == 0) -> if (!!1) -> if (1)
Simplify these comparisons so that Clang doesn't complain.
Link: https://github.com/ClangBuiltLinux/linux/issues/161
Signed-off-by: Nathan Chancellor <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions