Skip to content

Commit

Permalink
devtools: fix comment detection in forbidden token check
Browse files Browse the repository at this point in the history
[ upstream commit fdcc897 ]

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: 7413e7f ("devtools: alert on new calls to exit from libs")

Reported-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: David Marchand <david.marchand@redhat.com>
  • Loading branch information
david-marchand authored and bluca committed Feb 14, 2022
1 parent 33a5d15 commit 4ee719c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions devtools/check-forbidden-tokens.awk
Expand Up @@ -20,6 +20,9 @@ BEGIN {
# state machine assumes the comments structure is enforced by
# checkpatches.pl
(in_file) {
if ($0 ~ "^@@") {
in_comment = 0
}
# comment start
if (index($0,comment_start) > 0) {
in_comment = 1
Expand Down

0 comments on commit 4ee719c

Please sign in to comment.