From 985626b0f780526a0fc6dd99bad9a41eb615f6f2 Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Thu, 15 Jan 2009 13:51:06 -0800 Subject: [PATCH] --- yaml --- r: 129679 b: refs/heads/master c: 63f17f8973ccdb8260e59ce5b1b4e2b2ee0401f0 h: refs/heads/master i: 129677: 8344ade81945337bfb37d0cffc97b68b441766d5 129675: 833e4bbd524aa17c5308fd7e8bcfd7e13d9fe817 129671: 9d9a498f1a4be8a5d9d164078073c66d8b9421e3 129663: e391a7ccfb7aa36784768d2f2cbbf54f9e9f6fad v: v3 --- [refs] | 2 +- trunk/scripts/checkpatch.pl | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 3f87c7f01444..10575a060085 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f9a0b3d17a01fe1ba24ce1e9c18666a52052e011 +refs/heads/master: 63f17f8973ccdb8260e59ce5b1b4e2b2ee0401f0 diff --git a/trunk/scripts/checkpatch.pl b/trunk/scripts/checkpatch.pl index 1d7924ad3a34..696196e194f5 100755 --- a/trunk/scripts/checkpatch.pl +++ b/trunk/scripts/checkpatch.pl @@ -2016,7 +2016,11 @@ sub process { # Flatten any parentheses $value =~ s/\)\(/\) \(/g; - while ($value !~ /(?:$Ident|-?$Constant)\s*$Compare\s*(?:$Ident|-?$Constant)/ && $value =~ s/\([^\(\)]*\)/1/) { + while ($value =~ s/\[[^\{\}]*\]/1/ || + $value !~ /(?:$Ident|-?$Constant)\s* + $Compare\s* + (?:$Ident|-?$Constant)/x && + $value =~ s/\([^\(\)]*\)/1/) { } if ($value =~ /^(?:$Ident|-?$Constant)$/) {