qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Re: CODING_STYLE


From: Kevin Wolf
Subject: Re: [Qemu-devel] Re: CODING_STYLE
Date: Thu, 01 Oct 2009 10:56:15 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Thunderbird/3.0b3

Am 01.10.2009 03:25, schrieb Edgar E. Iglesias:
> On Wed, Sep 30, 2009 at 07:00:21PM +0200, Juan Quintela wrote:
>> "Michael S. Tsirkin" <address@hidden> wrote:
>>
>> ....
>>
>>>> Actually, I tried to tweak 'indent' to match QEMU style without much 
>>>> success.
>>>>
>>>> We could also select a new style, like Linux kernel one. I'm also not
>>>> a great fan of that either. But at least 'indent' could be used very
>>>> easily and I think there would be other benefits, like reuse of Git
>>>> hooks, patch checking scripts and Emacs configs. With full 'indent'
>>>> support all sources could be massaged mechanically to make the switch
>>>> less painful.
>>>>
>>>> Then there are K&R and GNU styles, but I like them even less.
>>>
>>> So ... Linux kernel style wins? What do others think?
>>
>> Where do I have to sign?
> 
>       Yeah.
> 
> I really don't care very much. I've changed my CRIS and MicroBlaze code from
> style to style a couple of times but the only style regardless of style I find
> offensive is the:
> 
> if (x) {
>   x=1;
> } else {
>   x=0;
> }
> 
> TBH, the extra curley braceys are just pure nonsense.

Except that when adding another line after x=1; the patch doesn't
contain a change to the if line (with a possibly long condition and the
possibility of introducing typos that nobody will see because everybody
assumes it's just the new brace).

But then, you could say the ugliness of braces is more important and I
really don't care too much about the braces. However, I don't think we
should change the coding style radically like switching to the Linux
kernel style.

Kevin




reply via email to

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