aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@canonical.com>2012-01-29 21:46:04 +0000
committerAndy Whitcroft <apw@canonical.com>2012-01-29 21:48:24 +0000
commitf8a73045dcaac70f9be770cca06f21c762a13878 (patch)
treed45b6159b50bcfe672c164685c04e3ac1ee748e0
parent5f90cd882c78daaa3d52ea211ce4375a69c2dfad (diff)
downloadcheckpatch-next.tar.gz
checkpatch: add [] to type extensionsnext
Add [] to a type extensions. Fixes false positives on: .attrs = (struct attribute *[]) { Signed-off-by: Andy Whitcroft <apw@canonical.com>
-rwxr-xr-xscripts/checkpatch.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index d1dd54422655fe..64de1bd5e16930 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -323,7 +323,7 @@ sub build_types {
}x;
$Type = qr{
$NonptrType
- (?:[\s\*]+\s*const|[\s\*]+|(?:\s*\[\s*\])+)?
+ (?:(?:\s|\*|\[\])+\s*const|(?:\s|\*|\[\])+|(?:\s*\[\s*\])+)?
(?:\s+$Inline|\s+$Modifier)*
}x;
$Declare = qr{(?:$Storage\s+)?$Type};