From owner-cvs-all Tue Dec 7 10: 9:26 1999 Delivered-To: cvs-all@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 2196614CBB; Tue, 7 Dec 1999 10:09:18 -0800 (PST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id LAA42573; Tue, 7 Dec 1999 11:09:04 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id LAA42628; Tue, 7 Dec 1999 11:09:01 -0700 (MST) Message-Id: <199912071809.LAA42628@harmony.village.org> To: Josef Karthauser Subject: Re: cvs commit: src/usr.bin/whois whois.c Cc: Bruce Evans , Josef Karthauser , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org In-reply-to: Your message of "Tue, 07 Dec 1999 16:03:20 GMT." <19991207160319.B67579@florence.pavilion.net> References: <19991207160319.B67579@florence.pavilion.net> <199912062118.NAA04479@freefall.freebsd.org> Date: Tue, 07 Dec 1999 11:09:01 -0700 From: Warner Losh Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk In message <19991207160319.B67579@florence.pavilion.net> Josef Karthauser writes: : > None were missing. Adding around one-line statements is explicitly : > forbidden in style(9). : > : > Bruce : I thought that it was _explicity_ required! That way when someone : visits the code later they don't need to worry about breaking code : because of missing braces. (A major cause of software bug, is it : not?) I almost posted this extract from style(9) before. No braces 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 permit- ted. Note, that seems pretty clear. Missing braces, as a cause of bugs, isn't that big a deal. How many commits to FreeBSD have there been which were the result of a missing brace? Damn few. How many were the result of carelessness, thinko-s, cut-and-paste-os', etc? Many more. Missing braces is at best a minor irritant, especially with editors that indent things based on the syntax around it which tends to catch these mistakes early. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message