Messages in this thread Patch in this message | | | From | Andy Whitcroft <> | Subject | [PATCH 06/23] checkpatch: comment detection: ignore macro continuation when detecting associated comments | Date | Thu, 12 Jun 2008 13:05:45 +0100 |
| |
When looking for an associated comment they may be suffixed by a macro continuation. Ignore this.
Signed-off-by: Andy Whitcroft <apw@shadowen.org> --- scripts/checkpatch.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index fd597a4..94250d1 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -631,7 +631,7 @@ sub ctx_locate_comment { my ($first_line, $end_line) = @_; # Catch a comment on the end of the line itself. - my ($current_comment) = ($rawlines[$end_line - 1] =~ m@.*(/\*.*\*/)\s*$@); + my ($current_comment) = ($rawlines[$end_line - 1] =~ m@.*(/\*.*\*/)\s*(?:\\\s*)?$@); return $current_comment if (defined $current_comment); # Look through the context and try and figure out if there is a -- 1.5.6.rc0.140.ga9675
| |