Documentation: update CodingStyle use of braces
authorAntonio Ospite <ospite@studenti.unina.it>
Fri, 4 Nov 2011 18:22:19 +0000 (11:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 4 Nov 2011 19:01:47 +0000 (12:01 -0700)
After commit 38829dc9d7b4 ("Documentation/CodingStyle: flesh out if-else
examples") highlight that if _only_one_ branch of a conditional
statement is a single statement, then braces are to be used on both
branches.

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/CodingStyle

index c940239d967811083278cf3c88c4342df18092ba..2b90d328b3ba5595c4f3a0e6bdc7c236346f550c 100644 (file)
@@ -166,8 +166,8 @@ if (condition)
 else
        do_that();
 
-This does not apply if one branch of a conditional statement is a single
-statement. Use braces in both branches.
+This does not apply if only one branch of a conditional statement is a single
+statement; in the latter case use braces in both branches:
 
 if (condition) {
        do_this();