aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@shadowen.org>2008-10-16 01:02:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-16 14:21:36 -0400
commit81bc0e020232a1e1e7010376382bb59ca82927ac (patch)
tree2b2efb18efca7c9a17d4e1f32d40f94f95101d57 /scripts
parentdea33496ddc2bf1a50e9def87b4ef14709d8cb6d (diff)
checkpatch: handle comment/quote nesting correctly
Ensure that a close comment cannot incorrectly trigger in the middle of a string. Reported by Jaswinder Singh. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Cc: Jaswinder Singh <jaswinder@infradead.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.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 5382f7287397..18646f076a84 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -335,7 +335,7 @@ sub sanitise_line {
335 $off++; 335 $off++;
336 next; 336 next;
337 } 337 }
338 if (substr($line, $off, 2) eq '*/') { 338 if ($sanitise_quote eq '*/' && substr($line, $off, 2) eq '*/') {
339 $sanitise_quote = ''; 339 $sanitise_quote = '';
340 substr($res, $off, 2, "$;$;"); 340 substr($res, $off, 2, "$;$;");
341 $off++; 341 $off++;