lkml.org 
[lkml]   [2011]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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();

\
 
 \ /
  Last update: 2011-11-04 19:25    [W:0.081 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site