From owner-cvs-all Mon Oct 29 9:27:32 2001 Delivered-To: cvs-all@freebsd.org Received: from mail6.speakeasy.net (mail6.speakeasy.net [216.254.0.206]) by hub.freebsd.org (Postfix) with ESMTP id 9692237B411 for ; Mon, 29 Oct 2001 09:27:14 -0800 (PST) Received: (qmail 57956 invoked from network); 29 Oct 2001 17:27:13 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([64.81.54.73]) (envelope-sender ) by mail6.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 29 Oct 2001 17:27:13 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20011029082644.E96115@iguana.aciri.org> Date: Mon, 29 Oct 2001 09:27:02 -0800 (PST) From: John Baldwin To: Luigi Rizzo Subject: Re: ipfw.c -- (was: cvs commit: src/sys/netinet ip_fw.h) Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Josef Karthauser , "Andrew R. Reiter" , Bruce Evans Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 29-Oct-01 Luigi Rizzo wrote: > On Tue, Oct 30, 2001 at 03:18:31AM +1100, Bruce Evans wrote: >> > > In 4.4-RELEASE, style.9 says: >> > > >> > > Parts of a for loop may be left empty. Don't put declarations >> > > inside >> > > blocks unless the routine is unusually complicated. >> > >> > oh yes, that was it. Well, I think that in the above section of style(9), >> > the only reasonable interpretation of "the routine" is >> > "the function in which the block is contained"; otherwise, you >> > should assume that you are not supposed to use local variables >> > in small functions! >> >> I think the only reasonable interpretation is that style(9) is poorly >> worded. "blocks" means "inner blocks like the for loop immediately >> following this paragraph". > > i questioned the interpretation of "routine", not "block". > Variable declarations that are 500 lines away are only calling for > subtle bugs to be introduced when modifying the code (and we have > plenty of very large functions in the kernel). Perhaps the large function needs to be split up then, and that is probably the goal of this style(9) requirement. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message