History

checkpatch: add [] to type extensions

Add [] to a type extensions. Fixes false positives on: .attrs = (struct attribute *[]) {

Andy Whitcroft committed 14 years ago

Commit b337d8b1 parent fd1b57a1 file · +1 −1Browse files

Unified · Split

scripts/checkpatch.pl+1−1
@@ -323,7 +323,7 @@ sub build_types { · 322 unmodified lines
323323 }x;
324324 $Type = qr{
325325 $NonptrType
326− (?:[\s\*]+\s*const|[\s\*]+|(?:\s*\[\s*\])+)?
326+ (?:(?:\s|\*|\[\])+\s*const|(?:\s|\*|\[\])+|(?:\s*\[\s*\])+)?
327327 (?:\s+$Inline|\s+$Modifier)*
328328 }x;
329329 $Declare = qr{(?:$Storage\s+)?$Type};