diff options
author | Andy Whitcroft <apw@canonical.com> | 2012-01-29 21:46:04 +0000 |
---|---|---|
committer | Andy Whitcroft <apw@canonical.com> | 2012-01-29 21:48:24 +0000 |
commit | f8a73045dcaac70f9be770cca06f21c762a13878 (patch) | |
tree | d45b6159b50bcfe672c164685c04e3ac1ee748e0 | |
parent | 5f90cd882c78daaa3d52ea211ce4375a69c2dfad (diff) | |
download | checkpatch-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-x | scripts/checkpatch.pl | 2 |
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}; |