[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1220376314-15180-4-git-send-email-apw@shadowen.org>
Date: Tue, 2 Sep 2008 18:25:10 +0100
From: Andy Whitcroft <apw@...dowen.org>
To: Andrew Morton <akpm@...l.org>
Cc: Randy Dunlap <rdunlap@...otime.net>,
Joel Schopp <jschopp@...tin.ibm.com>,
Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org,
Andy Whitcroft <apw@...dowen.org>,
Jaswinder Singh <jaswinder@...radead.org>
Subject: [PATCH 3/7] 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@...dowen.org>
Cc: Jaswinder Singh <jaswinder@...radead.org>
---
scripts/checkpatch.pl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 5382f72..18646f0 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -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++;
--
1.6.0.rc1.258.g80295
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists