forked from Mirror/frr
tools/checkpatch: recognize +
as unary operator
Allow using "+1" when meaningful (i.e. cmd_graph_merge wants -1 or +1) Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
0bf664527d
commit
67a76894b7
|
@ -5150,7 +5150,7 @@ sub process {
|
||||||
# none after. May be left adjacent to another
|
# none after. May be left adjacent to another
|
||||||
# unary operator, or a cast
|
# unary operator, or a cast
|
||||||
} elsif ($op eq '!' || $op eq '~' ||
|
} elsif ($op eq '!' || $op eq '~' ||
|
||||||
$opv eq '*U' || $opv eq '-U' ||
|
$opv eq '*U' || $opv eq '-U' || $opv eq '+U' ||
|
||||||
$opv eq '&U' || $opv eq '&&U') {
|
$opv eq '&U' || $opv eq '&&U') {
|
||||||
if ($ctx !~ /[WEBC]x./ && $ca !~ /(?:\)|!|~|\*|-|\&|\||\+\+|\-\-|\{)$/) {
|
if ($ctx !~ /[WEBC]x./ && $ca !~ /(?:\)|!|~|\*|-|\&|\||\+\+|\-\-|\{)$/) {
|
||||||
if (ERROR("SPACING",
|
if (ERROR("SPACING",
|
||||||
|
|
Loading…
Reference in a new issue