checkpatch: improve "no space necessary after cast" test
[linux-2.6-block.git] / scripts / checkpatch.pl
index 7f1804e052f2b4ba1f05fec697a14576d544187b..a9baaabfae36191063343f18329dbb2b4f0cf2e4 100755 (executable)
@@ -2541,7 +2541,7 @@ sub process {
                        }
                }
 
-               if ($line =~ /^\+.*(\w+\s*)?\(\s*$Type\s*\)[ \t]+(?!$Assignment|$Arithmetic|[,;\({\[\<\>])/ &&
+               if ($line =~ /^\+.*(\w+\s*)?\(\s*$Type\s*\)[ \t]+(?!$Assignment|$Arithmetic|[,;:\?\(\{\}\[\<\>]|&&|\|\||\\$)/ &&
                    (!defined($1) || $1 !~ /sizeof\s*/)) {
                        if (CHK("SPACING",
                                "No space is necessary after a cast\n" . $herecurr) &&