Gavin Vess wrote:
.. although the Linux Kernel team does not use braces when there is only one statement after the conditional. I would prefer we follow this standard more closely, and eliminate braces around a single statement. Anyone else have this preference?
Have you really never seen someone introduce a bug into a system because they added another statement to the conditional and forgot to put the braces back in? These things don't happen every day, but they are relatively common and can be difficult to spot. Always having braces in place eliminates a source of bugs and not doing it doesn't save much, so for me the choice is easy.

Reply via email to