summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@opensourcerouting.org>2024-07-21 21:19:44 +0200
committerDonald Sharp <sharpd@nvidia.com>2024-07-31 14:08:53 +0200
commit67a76894b70f73c62b7eb2d05a02ef282c16ec82 (patch)
tree61cd74ea9ee38fb5e11e209589e68eb0200bbdee /tools
parentlib: allow static/pre-initialized vectors (diff)
downloadfrr-67a76894b70f73c62b7eb2d05a02ef282c16ec82.tar.xz
frr-67a76894b70f73c62b7eb2d05a02ef282c16ec82.zip
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>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/checkpatch.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/checkpatch.pl b/tools/checkpatch.pl
index 3e7abeda3..2c773f7fb 100755
--- a/tools/checkpatch.pl
+++ b/tools/checkpatch.pl
@@ -5150,7 +5150,7 @@ sub process {
# none after. May be left adjacent to another
# 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' ||
$opv eq '&U' || $opv eq '&&U') {
if ($ctx !~ /[WEBC]x./ && $ca !~ /(?:\)|!|~|\*|-|\&|\||\+\+|\-\-|\{)$/) {
if (ERROR("SPACING",