]> git.puffer.fish Git - mirror/frr.git/commitdiff
tools/checkpatch: recognize `+` as unary operator
authorDavid Lamparter <equinox@opensourcerouting.org>
Sun, 21 Jul 2024 19:19:44 +0000 (12:19 -0700)
committerDonald Sharp <sharpd@nvidia.com>
Wed, 31 Jul 2024 12:08:53 +0000 (08:08 -0400)
Allow using "+1" when meaningful (i.e. cmd_graph_merge wants -1 or +1)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
tools/checkpatch.pl

index 3e7abeda3962088194d27df67931fce2c3ad3a94..2c773f7fbcb393511dbb0fdac437e501da0710ec 100755 (executable)
@@ -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",