Re: [patch]clarification of coding style regarding conditional statements with two branches

2007-05-04 Thread Jan Engelhardt
On May 4 2007 16:48, Jiri Slaby wrote: >> >> +Do not unnecessarily use braces where a single statement will do. >> + >> +if (condition) >> +action(); >> + >> +This does not apply if one branch of a conditional statement is a single >> +statement. Use braces in both branches. > >Why, what's w

Re: [patch]clarification of coding style regarding conditional statements with two branches

2007-05-04 Thread Jiri Slaby
Oliver Neukum napsal(a): > Am Freitag, 4. Mai 2007 16:48 schrieb Jiri Slaby: >> Why, what's wrong with >> if (condition) { >> do_this(); >> do_that(); >> } else >> otherwise(); >> >> ? It's more readable/nicer in my eyes than > > Than I am afraid we need to agree to disagre

Re: [patch]clarification of coding style regarding conditional statements with two branches

2007-05-04 Thread Krzysztof Halasa
Jiri Slaby <[EMAIL PROTECTED]> writes: > Why, what's wrong with > if (condition) { > do_this(); > do_that(); > } else > otherwise(); > > ? It's more readable/nicer in my eyes than I think so. And it means less lines #. >> +if (condition) { >> +do_this(); >> +do_that();

Re: [patch]clarification of coding style regarding conditional statements with two branches

2007-05-04 Thread Oliver Neukum
Am Freitag, 4. Mai 2007 16:48 schrieb Jiri Slaby: > Why, what's wrong with > if (condition) { > do_this(); > do_that(); > } else > otherwise(); > > ? It's more readable/nicer in my eyes than Than I am afraid we need to agree to disagree. But then I would insist that neithe

Re: [patch]clarification of coding style regarding conditional statements with two branches

2007-05-04 Thread Jiri Slaby
Oliver Neukum napsal(a): > Hi, > > I suggest that the coding style should state that if either branch of > an 'if' statement needs braces, both branches should use them. > > Regards > Oliver > Signed-off-by: Oliver Neukum <[EMAIL PROTECTED]> > > > --- a/Documentation/Cod

[patch]clarification of coding style regarding conditional statements with two branches

2007-05-04 Thread Oliver Neukum
Hi, I suggest that the coding style should state that if either branch of an 'if' statement needs braces, both branches should use them. Regards Oliver Signed-off-by: Oliver Neukum <[EMAIL PROTECTED]> --- a/Documentation/CodingStyle 2007-04-20 13:08:17.0 +020