Messages in this thread Patch in this message | | | Date | Fri, 04 Nov 2011 11:22:19 -0700 | From | Randy Dunlap <> | Subject | [PATCH 4/8] Documentation: update CodingStyle use of braces |
| |
From: Antonio Ospite <ospite@studenti.unina.it>
After commit 38829dc 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> --- Documentation/CodingStyle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
--- lnx1104.orig/Documentation/CodingStyle +++ lnx1104/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();
| |