lkml.org 
[lkml]   [2008]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 06/23] checkpatch: comment detection: ignore macro continuation when detecting associated comments
Date
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


\
 
 \ /
  Last update: 2008-06-12 14:11    [W:0.200 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site