devtools: fix directory filter in forbidden token check

checkpatches.sh current complains on a patch [1] adding
ALLOW_EXPERIMENTAL_API in an example while this check is for app, lib
and drivers directories:

Warning in examples/ethtool/ethtool-app/Makefile:
Using experimental build flag for in-tree compilation

The regexp on entering files concerned by this filter is incorrect.
In the [1] case, the file full name is matched against "app" rather than
"+++ b/app".

1: https://patchwork.dpdk.org/patch/83902/

Fixes: 7413e7f2ae ("devtools: alert on new calls to exit from libs")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
This commit is contained in:
David Marchand 2020-11-10 16:40:05 +01:00 committed by Thomas Monjalon
parent 3495a68f2a
commit cb2587644e

View File

@ -54,7 +54,7 @@ BEGIN {
}
for (i in deny_folders) {
re = "^\\+\\+\\+ b/" deny_folders[i];
if ($0 ~ deny_folders[i]) {
if ($0 ~ re) {
in_file = 1
last_file = $0
}