From owner-svn-src-stable-9@freebsd.org Fri Dec 4 09:08:40 2015 Return-Path: Delivered-To: svn-src-stable-9@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 764FEA3F853; Fri, 4 Dec 2015 09:08:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BAE41DEA; Fri, 4 Dec 2015 09:08:40 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB498dEh048648; Fri, 4 Dec 2015 09:08:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB498dip048647; Fri, 4 Dec 2015 09:08:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512040908.tB498dip048647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 4 Dec 2015 09:08:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291756 - stable/9/share/man/man9 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 09:08:40 -0000 Author: ngie Date: Fri Dec 4 09:08:39 2015 New Revision: 291756 URL: https://svnweb.freebsd.org/changeset/base/291756 Log: MFstable/10 r291754: MFC r284527,r284528,r284608,r285219,r291166,r291167: r284527 (by imp): Update style.9 to reflect consensus on developer's mailing list allowing redundant braces. Differential Revision: https://reviews.freebsd.org/D2842 r284528 (by imp): Bump date. Submitted by: Xin Li r284608 (by imp): Back out contested change until dispute is resolved. This proved to be more contentious than I expected. r285219 (by imp): The results of the vote are in. This reflects that vote. Single line statements inside of braces is recognized as an acceptable style. http://reviews.freebsd.org/V3 As always, this isn't license for wholesale change, etc. r291166: Recommend cc -Wall instead of gcc -Wall r291167: Bump .Dd Modified: stable/9/share/man/man9/style.9 Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man9/ (props changed) Modified: stable/9/share/man/man9/style.9 ============================================================================== --- stable/9/share/man/man9/style.9 Fri Dec 4 09:07:54 2015 (r291755) +++ stable/9/share/man/man9/style.9 Fri Dec 4 09:08:39 2015 (r291756) @@ -26,7 +26,7 @@ .\" From: @(#)style 1.14 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd January 7, 2010 +.Dd November 22, 2015 .Dt STYLE 9 .Os .Sh NAME @@ -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 function should be consistent. Forever loops are done with .Ic for Ns 's , not @@ -833,7 +834,7 @@ Whenever possible, code should be run th (e.g., .Xr lint 1 or -.Nm gcc Fl Wall ) +.Nm cc Fl Wall ) and produce minimal warnings. .Sh SEE ALSO .Xr indent 1 ,