Re: [Qemu-devel] CODING_STYLE and if blocks

2009-10-22 Thread Aurelien Jarno
On Fri, Oct 23, 2009 at 01:47:04AM +0200, Alexander Graf wrote: > > On 23.10.2009, at 00:42, Anthony Liguori wrote: > >> Aurelien Jarno wrote: >>> Hi all, >>> >>> I am currently reviewing the S390 patches which extensively use of >>> code like: >>> >>>if (a == 5) printf("a was 5.\n"); >>>el

Re: [Qemu-devel] CODING_STYLE and if blocks

2009-10-22 Thread Alexander Graf
On 23.10.2009, at 00:42, Anthony Liguori wrote: Aurelien Jarno wrote: Hi all, I am currently reviewing the S390 patches which extensively use of code like: if (a == 5) printf("a was 5.\n"); else if (a == 6) printf("a was 6.\n"); else printf("a was something else entirely.\n"); It i

Re: [Qemu-devel] CODING_STYLE and if blocks

2009-10-22 Thread Natalia Portillo
if (a == 5) { printf("a was 5.\n"); } else if (a == 6) { printf("a was 6.\n"); } else { printf("a was something else entirely.\n"); } Is in my opinion LOT CLEANER to debug. This is my personal preference (comments included): if (a == 5) // Check if it is 5

Re: [Qemu-devel] CODING_STYLE and if blocks

2009-10-22 Thread Anthony Liguori
Aurelien Jarno wrote: Hi all, I am currently reviewing the S390 patches which extensively use of code like: if (a == 5) printf("a was 5.\n"); else if (a == 6) printf("a was 6.\n"); else printf("a was something else entirely.\n"); It is something currently allowed by the CODING_STYL

[Qemu-devel] CODING_STYLE and if blocks

2009-10-22 Thread Aurelien Jarno
Hi all, I am currently reviewing the S390 patches which extensively use of code like: if (a == 5) printf("a was 5.\n"); else if (a == 6) printf("a was 6.\n"); else printf("a was something else entirely.\n"); It is something currently allowed by the CODING_STYLE document (there is no