Documentation/CodingStyle: flesh out if-else examples
authorHarry Wei <jiaweiwei.xiyou@gmail.com>
Tue, 22 Mar 2011 23:35:01 +0000 (16:35 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Mar 2011 00:44:16 +0000 (17:44 -0700)
commit38829dc9d7b46b195ab99d62c8c53c21a7adc36b
treeff38cc7aa7965af81e2d5ee5f21e2724489269ec
parent0bc825d240abcaf5ed6e9d59b44215b51718ef5b
Documentation/CodingStyle: flesh out if-else examples

There is a missing case for "Chapter 3: Placing Braces and Spaces".  We
often know we should not use braces where a single statement.  The first
case is:

if (condition)
action();

Another case is:

if (condition)
do_this();
else
do_that();

However, I can not find a description of the second case.

Signed-off-by: Harry Wei <harryxiyou@gmail.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/CodingStyle