Skip to content

Commit

Permalink
tools: checkpatch updated with darr_foreach iter macros
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
choppsv1 committed Oct 27, 2023
1 parent 48941fe commit 1285a65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ sub hash_show_words {

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|
Expand Down
3 changes: 2 additions & 1 deletion tools/checkpatch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1285a65

Please sign in to comment.