checkpatch: ensure cast type is unique in the context parser
authorAndy Whitcroft <[email protected]>
Tue, 10 Jan 2012 23:10:11 +0000 (15:10 -0800)
committerLinus Torvalds <[email protected]>
Wed, 11 Jan 2012 00:30:51 +0000 (16:30 -0800)
Ensure the cast type is unique in the context parser, we do not want them
to detect as a comma ','.

Signed-off-by: Andy Whitcroft <[email protected]>
Cc: Joe Perches <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
scripts/checkpatch.pl

index ba7bcf34ad01e6bdf1b5f20371782c421ec7d717..497416c8360be6ee8381ad8864272d35e9d804da 100755 (executable)
@@ -1032,7 +1032,7 @@ sub annotate_values {
                } elsif ($cur =~ /^(\(\s*$Type\s*)\)/ && $av_pending eq '_') {
                        print "CAST($1)\n" if ($dbg_values > 1);
                        push(@av_paren_type, $type);
-                       $type = 'C';
+                       $type = 'c';
 
                } elsif ($cur =~ /^($Type)\s*(?:$Ident|,|\)|\(|\s*$)/) {
                        print "DECLARE($1)\n" if ($dbg_values > 1);