mirror of https://gerrit.osmocom.org/osmo-ci
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: 0d413866c7
Change-Id: I7ce79e6b291b3a3dab6587a589eeef0a0bc53de9
This commit is contained in:
parent
5409188d55
commit
444ca841e6
|
@ -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)) {
|
||||
|
|
Loading…
Reference in New Issue