]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - scripts/checkpatch.pl
checkpatch: fix 'return is not a function' square bracket handling
[~shefty/rdma-dev.git] / scripts / checkpatch.pl
index ca6d0fb229f2c2fa89acb096fadb0f4d572b581a..5e3f4191f9596629cb1c72eddc4f313c9aeb8691 100755 (executable)
@@ -2609,7 +2609,7 @@ sub process {
                        # Flatten any parentheses
                        $value =~ s/\(/ \(/g;
                        $value =~ s/\)/\) /g;
-                       while ($value =~ s/\[[^\{\}]*\]/1/ ||
+                       while ($value =~ s/\[[^\[\]]*\]/1/ ||
                               $value !~ /(?:$Ident|-?$Constant)\s*
                                             $Compare\s*
                                             (?:$Ident|-?$Constant)/x &&