summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2015-06-17 21:25:36 +0000
committerimp <imp@FreeBSD.org>2015-06-17 21:25:36 +0000
commit561baaa04991a9e9f08e617e41d0509fcfe030a8 (patch)
tree931fdb6d89896209ddce1ff34df5ef9f4897dc49
parent25a52b7a51a96888456f2135cc4f511c3bda54f1 (diff)
downloadFreeBSD-src-561baaa04991a9e9f08e617e41d0509fcfe030a8.zip
FreeBSD-src-561baaa04991a9e9f08e617e41d0509fcfe030a8.tar.gz
Update style.9 to reflect consensus on developer's mailing list
allowing redundant braces. Differential Revision: https://reviews.freebsd.org/D2842
-rw-r--r--share/man/man9/style.99
1 files changed, 5 insertions, 4 deletions
diff --git a/share/man/man9/style.9 b/share/man/man9/style.9
index ed65ac6..70dc12d 100644
--- a/share/man/man9/style.9
+++ b/share/man/man9/style.9
@@ -503,13 +503,14 @@ Code which is unreachable for non-obvious reasons may be marked /*
.Pp
Space after keywords
.Pq Ic if , while , for , return , switch .
-No braces
+Two styles of braces
.Ql ( \&{
and
.Ql \&} )
-are
-used for control statements with zero or only a single statement unless that
-statement is more than a single line in which case they are permitted.
+are allowed for single line statements.
+Either they are used for all single statements, or
+they are used only where needed for clarity.
+Usage within a file should be consistent.
Forever loops are done with
.Ic for Ns 's ,
not
OpenPOWER on IntegriCloud