devtools: fix comment detection in forbidden token check
After a comment section was detected, passing to a new hunk was not seen as ending the section and all subsequent hunks were ignored. Fixes: 7413e7f2aeb3 ("devtools: alert on new calls to exit from libs") Cc: stable@dpdk.org Reported-by: Thomas Monjalon <thomas@monjalon.net> Signed-off-by: David Marchand <david.marchand@redhat.com>
This commit is contained in:
parent
e2cbb38450
commit
fdcc8970bc
@ -20,6 +20,9 @@ BEGIN {
|
|||||||
# state machine assumes the comments structure is enforced by
|
# state machine assumes the comments structure is enforced by
|
||||||
# checkpatches.pl
|
# checkpatches.pl
|
||||||
(in_file) {
|
(in_file) {
|
||||||
|
if ($0 ~ "^@@") {
|
||||||
|
in_comment = 0
|
||||||
|
}
|
||||||
# comment start
|
# comment start
|
||||||
if (index($0,comment_start) > 0) {
|
if (index($0,comment_start) > 0) {
|
||||||
in_comment = 1
|
in_comment = 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user