提交 81bc0e02 编写于 作者: A Andy Whitcroft 提交者: Linus Torvalds

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: NAndy Whitcroft <apw@shadowen.org>
Cc: Jaswinder Singh <jaswinder@infradead.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 dea33496
......@@ -335,7 +335,7 @@ sub sanitise_line {
$off++;
next;
}
if (substr($line, $off, 2) eq '*/') {
if ($sanitise_quote eq '*/' && substr($line, $off, 2) eq '*/') {
$sanitise_quote = '';
substr($res, $off, 2, "$;$;");
$off++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册