]> git.puffer.fish Git - mirror/frr.git/commitdiff
tools: checkpatch updated with darr_foreach iter macros 14525/head
authorChristian Hopps <chopps@labn.net>
Tue, 24 Oct 2023 18:58:11 +0000 (14:58 -0400)
committerChristian Hopps <chopps@labn.net>
Mon, 6 Nov 2023 22:44:58 +0000 (17:44 -0500)
Also update `checkpatch.sh` so it runs `checkpatch.pl` from the same directory
it resides in. This allows copying them both somewhere else to use a specific
version.

Signed-off-by: Christian Hopps <chopps@labn.net>
tools/checkpatch.pl
tools/checkpatch.sh

index 3e8a6b392a3e43d17c0f59cba3d6456413e4efba..e3788bde16b600757f460b9222b0e4378c15f3ac 100755 (executable)
@@ -547,7 +547,7 @@ our $Operators      = qr{
 
 our $c90_Keywords = qr{do|for|while|if|else|return|goto|continue|switch|default|case|break}x;
 our $Iterators = qr{
-                       frr_each|frr_each_safe|frr_each_from|
+                       darr_foreach_p|darr_foreach_i|frr_each|frr_each_safe|frr_each_from|
                        frr_with_mutex|frr_with_privs|
                        LIST_FOREACH|LIST_FOREACH_SAFE|
                        SLIST_FOREACH|SLIST_FOREACH_SAFE|SLIST_FOREACH_PREVPTR|
index 6071f4804d9ef7e445be063cbd0e7711180b9e14..bf63057b0219935a856dce519feb919e10d3b090 100755 (executable)
@@ -3,7 +3,8 @@
 usage="./checkpatch.sh <patch> <tree>"
 patch=$1
 tree=$2
-checkpatch="$tree/tools/checkpatch.pl --no-tree -f"
+scriptdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
+checkpatch="$scriptdir/checkpatch.pl --no-tree -f"
 ignore="ldpd\|babeld"
 cwd=${PWD##*/}
 dirty=0