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 fdcc8970bce23d476e7fabd18a82fb298725c511 ]

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 cpaelzer committed Feb 25, 2022
1 parent 1e884c7 commit 692ac5f
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 692ac5f

Please sign in to comment.