Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jun 2015 21:25:37 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r284527 - head/share/man/man9
Message-ID:  <201506172125.t5HLPbs6040445@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Wed Jun 17 21:25:36 2015
New Revision: 284527
URL: https://svnweb.freebsd.org/changeset/base/284527

Log:
  Update style.9 to reflect consensus on developer's mailing list
  allowing redundant braces.
  
  Differential Revision: https://reviews.freebsd.org/D2842

Modified:
  head/share/man/man9/style.9

Modified: head/share/man/man9/style.9
==============================================================================
--- head/share/man/man9/style.9	Wed Jun 17 19:26:23 2015	(r284526)
+++ head/share/man/man9/style.9	Wed Jun 17 21:25:36 2015	(r284527)
@@ -503,13 +503,14 @@ Code which is unreachable for non-obviou
 .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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201506172125.t5HLPbs6040445>