From: Antonio Ospite Date: Fri, 4 Nov 2011 18:22:19 +0000 (-0700) Subject: Documentation: update CodingStyle use of braces X-Git-Tag: v3.2-rc1~58 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b218ab0a5af943441e1daa7dc811874ecd409229;p=profile%2Fivi%2Fkernel-x86-ivi.git Documentation: update CodingStyle use of braces 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 Signed-off-by: Randy Dunlap Signed-off-by: Linus Torvalds --- diff --git a/Documentation/CodingStyle b/Documentation/CodingStyle index c940239..2b90d32 100644 --- a/Documentation/CodingStyle +++ b/Documentation/CodingStyle @@ -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();