aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@shadowen.org>2009-01-06 17:41:16 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 18:59:15 -0500
commit721c1cb60e0546d2e71b9aa50426c94e69c6521a (patch)
tree69c767f29569545e1ec8e950fce4b4a03ae970fe /scripts
parent691d77b6b85c20e4166bafd12bd0131b28f95a16 (diff)
checkpatch: comment detection may miss an implied comment on the last hunk
When detecting implied comments from leading stars we may incorrectly think we have detected an edge one way or the other when we have not if we drop off the end of the last hunk. Fix this up. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 826cdbac0114..7c17e95bf36f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1097,8 +1097,8 @@ sub process {
1097 $rawlines[$ln - 1] =~ /^-/); 1097 $rawlines[$ln - 1] =~ /^-/);
1098 $cnt--; 1098 $cnt--;
1099 #print "RAW<$rawlines[$ln - 1]>\n"; 1099 #print "RAW<$rawlines[$ln - 1]>\n";
1100 ($edge) = (defined $rawlines[$ln - 1] && 1100 last if (!defined $rawlines[$ln - 1]);
1101 $rawlines[$ln - 1] =~ m@(/\*|\*/)@); 1101 ($edge) = ($rawlines[$ln - 1] =~ m@(/\*|\*/)@);
1102 last if (defined $edge); 1102 last if (defined $edge);
1103 } 1103 }
1104 if (defined $edge && $edge eq '*/') { 1104 if (defined $edge && $edge eq '*/') {