Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Dec 1999 11:09:01 -0700
From:      Warner Losh <imp@village.org>
To:        Josef Karthauser <joe@pavilion.net>
Cc:        Bruce Evans <bde@zeta.org.au>, Josef Karthauser <joe@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.bin/whois whois.c 
Message-ID:  <199912071809.LAA42628@harmony.village.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> <Pine.BSF.4.10.9912071000200.4891-100000@alphplex.bde.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
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




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