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 that doesn't ALWAYS
have the braces everywhere since it makes adding a print statement
or other debuging to the condition such a pain since you then have to
add braces to the condition to avoid breaking the code just to insert
a print statement. It is one of the few things I disagree with in the
linux kernel coding style.
I agree - it is merely defensive programming to always have the braces, it prevents someone
from sticking in a diag and forgetting to add braces so things go haywire.