diff options
author | Oliver Smith <osmith@sysmocom.de> | 2021-07-07 11:17:34 +0200 |
---|---|---|
committer | Oliver Smith <osmith@sysmocom.de> | 2021-07-07 11:28:38 +0200 |
commit | 444ca841e65b1d4974c82ccb9d120b10bebff270 (patch) | |
tree | 2c410fa4e621af333ae1a4f2b004080ee67164db | |
parent | 5409188d554edea8c0fa5b749572ce3d3777e86b (diff) |
lint: checkpatch.pl: fix && complaints
Don't complain with:
ERROR:SPACING: space prohibited after that '&&' (ctx:ExW)
in code similar to:
if (conn->conn->mode != MGCP_CONN_LOOPBACK
&& conn->conn->mode != MGCP_CONN_RECV_ONLY
&& !mgcp_rtp_end_remote_addr_available(&conn->end)) {
The check was supposed to complain about spaces if the && is used as
unary operator (to get the address of a goto label). But it's clearly
producing false positives in the Osmocom context with use as non-unary
operator, so remove this check.
Related: OS#5087
Related: https://github.com/torvalds/linux/commit/0d413866c7df63794790518e3fd5890969c206ad
Change-Id: I7ce79e6b291b3a3dab6587a589eeef0a0bc53de9
-rwxr-xr-x | lint/checkpatch/checkpatch.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lint/checkpatch/checkpatch.pl b/lint/checkpatch/checkpatch.pl index dc56812..ad99e0c 100755 --- a/lint/checkpatch/checkpatch.pl +++ b/lint/checkpatch/checkpatch.pl @@ -5072,7 +5072,7 @@ sub process { # unary operator, or a cast } elsif ($op eq '!' || $op eq '~' || $opv eq '*U' || $opv eq '-U' || - $opv eq '&U' || $opv eq '&&U') { + $opv eq '&U') { # Osmocom specific: &&U removed if ($ctx !~ /[WEBC]x./ && $ca !~ /(?:\)|!|~|\*|-|\&|\||\+\+|\-\-|\{)$/) { if (ERROR("SPACING", "space required before that '$op' $at\n" . $hereptr)) { |