Date: Mon, 29 Oct 2001 09:27:02 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: Luigi Rizzo <rizzo@aciri.org> Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Josef Karthauser <joe@FreeBSD.org>, "Andrew R. Reiter" <arr@watson.org>, Bruce Evans <bde@zeta.org.au> Subject: Re: ipfw.c -- (was: cvs commit: src/sys/netinet ip_fw.h) Message-ID: <XFMail.011029092702.jhb@FreeBSD.org> In-Reply-To: <20011029082644.E96115@iguana.aciri.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org> -- 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.011029092702.jhb>