[PATCH 02/16] checkpatch: types may sit on a line on their own

Previous thread: [git pull] vfs for rc2, part 1 by Al Viro on Wednesday, August 18, 2010 - 8:35 am. (3 messages)

Next thread: [PATCH 09/16] checkpatch: ensure kconfig help checks only apply when we are adding help by Andy Whitcroft on Wednesday, August 18, 2010 - 8:46 am. (1 message)
From: Andy Whitcroft
Date: Wednesday, August 18, 2010 - 8:46 am

When the following form is used we have a type which fully fills a line.
This means that a type may end at the end of line as well as at the
following identifier.

	int **
	foo;

Reported-by: Daniel Walker <dwalker@fifo99.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 scripts/checkpatch.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 0a87c74..41f59b1 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -843,7 +843,7 @@ sub annotate_values {
 				$av_preprocessor = 0;
 			}
 
-		} elsif ($cur =~ /^($Type)\s*(?:$Ident|,|\)|\()/) {
+		} elsif ($cur =~ /^($Type)\s*(?:$Ident|,|\)|\(|\s*$)/) {
 			print "DECLARE($1)\n" if ($dbg_values > 1);
 			$type = 'T';
 
-- 
1.7.0.4

--

Previous thread: [git pull] vfs for rc2, part 1 by Al Viro on Wednesday, August 18, 2010 - 8:35 am. (3 messages)

Next thread: [PATCH 09/16] checkpatch: ensure kconfig help checks only apply when we are adding help by Andy Whitcroft on Wednesday, August 18, 2010 - 8:46 am. (1 message)