qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH v2 3/3] checkpatch: adjust to QEMUisms


From: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH v2 3/3] checkpatch: adjust to QEMUisms
Date: Tue, 18 Jan 2011 11:24:27 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

On 01/17/2011 08:37 PM, Blue Swirl wrote:
On Mon, Jan 17, 2011 at 7:40 AM, Paolo Bonzini<address@hidden>  wrote:
On 01/15/2011 06:45 PM, Blue Swirl wrote:

+                       if ($level == 0&&  !$block =~ /^\s*\{/&&
!$allowed) {

I'm not a Perl expert at all, but I think you need parentheses for the
argument of "!":

! has higher precedence than =~:
http://perldoc.perl.org/perlop.html#Operator-Precedence-and-Associativity

I think that's what I meant. :)

  if ($level == 0&&  !($block =~ /^\s*\{/)&&  !$allowed) {

Maybe instead:
if ($level == 0&&  $block !~ /^\s*\{/&&  !$allowed) {

Yes, this too.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]