qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments


From: Jes Sorensen
Subject: Re: [Qemu-devel] [PATCH 0/5] CODING_STYLE amendments
Date: Mon, 23 Aug 2010 10:14:56 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Thunderbird/3.0.5

On 08/22/10 20:39, malc wrote:
> Disregarding my own stance on the braces, braces around single statement
> is actually helpful w.r.t. debugging imaging trying to set a break point
> on said singlesttement, plain impossible in following case:
> 
> if (a) b;

Oh there is no talk about suggesting we force things onto a single line.
Putting if(foo) bar(); on the same line is just plain wrong, what I
referred to was this:

    if (foo)
        bar();

vs
    if (foo) {
        bar();
    }

If it is part of a multi-block if()/else block yes it's good for
consistency, if it is a one off in the code, it doesn't add any value
IMHO, it is a loss because it wastes space for no reason.

Cheers,
Jes



reply via email to

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