Re: CodingStyle: start flamewar about use of braces

2007-05-09 Thread Pekka Enberg
On 5/9/07, Stefan Richter <[EMAIL PROTECTED]> wrote: I don't know which form is better suited to the goal of well maintainable code --- the compact, easy to read, winning guideline, or the comprehensive norm. Bah, it's a slippery slope. Too little guidelines and we end up people submitting code

Re: CodingStyle: start flamewar about use of braces

2007-05-09 Thread Stefan Richter
Satyam Sharma wrote: > It's quite funny to worship them as "prophets" and adopt their style > for some stuff (with a simple "Rationale: K&R.") one instant and then > suggest a style completely opposite to theirs one screenful later in > the same file. That's what happens to a text which is increme

Re: CodingStyle: start flamewar about use of braces

2007-05-08 Thread Satyam Sharma
On 5/9/07, Jeff Garzik <[EMAIL PROTECTED]> wrote: Randy Dunlap wrote: > On Tue, 8 May 2007 19:03:10 GMT Linux Kernel Mailing List wrote: > >> Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e659ba4a0d2d471c0d73590f78e1a1b5a1eede48 >> Commit: e659ba

Re: CodingStyle: start flamewar about use of braces

2007-05-08 Thread Jeff Garzik
Stephen Clark wrote: Lennart Sorensen wrote: On Tue, May 08, 2007 at 05:19:45PM -0400, Jeff Garzik wrote: If anyone tries to add braces to my code's 'else' statements where they are not required, that patch will get NAK'd in a heartbeat. Oh isn't coding style fun. I personally hate code tha

Re: CodingStyle: start flamewar about use of braces

2007-05-08 Thread Stephen Clark
Lennart Sorensen wrote: On Tue, May 08, 2007 at 05:19:45PM -0400, Jeff Garzik 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 bo

Re: CodingStyle: start flamewar about use of braces

2007-05-08 Thread Lennart Sorensen
On Tue, May 08, 2007 at 05:19:45PM -0400, Jeff Garzik 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 bran

Re: CodingStyle: start flamewar about use of braces

2007-05-08 Thread Jeff Garzik
Randy Dunlap wrote: On Tue, 8 May 2007 19:03:10 GMT Linux Kernel Mailing List wrote: Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e659ba4a0d2d471c0d73590f78e1a1b5a1eede48 Commit: e659ba4a0d2d471c0d73590f78e1a1b5a1eede48 Parent: 28be5abb400

Re: CodingStyle: start flamewar about use of braces

2007-05-08 Thread Randy Dunlap
On Tue, 8 May 2007 19:03:10 GMT Linux Kernel Mailing List wrote: > Gitweb: > http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e659ba4a0d2d471c0d73590f78e1a1b5a1eede48 > Commit: e659ba4a0d2d471c0d73590f78e1a1b5a1eede48 > Parent: 28be5abb400e5e082f5225105f