From owner-cvs-all Mon Oct 29 0:15:55 2001 Delivered-To: cvs-all@freebsd.org Received: from iguana.aciri.org (iguana.aciri.org [192.150.187.36]) by hub.freebsd.org (Postfix) with ESMTP id AF83837B406; Mon, 29 Oct 2001 00:15:51 -0800 (PST) Received: (from rizzo@localhost) by iguana.aciri.org (8.11.3/8.11.1) id f9T8CNQ96087; Mon, 29 Oct 2001 00:12:23 -0800 (PST) (envelope-from rizzo) Date: Mon, 29 Oct 2001 00:12:23 -0800 From: Luigi Rizzo To: "Andrew R. Reiter" Cc: Josef Karthauser , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: ipfw.c -- (was: cvs commit: src/sys/netinet ip_fw.h) Message-ID: <20011029001222.A96017@iguana.aciri.org> References: <20011029000216.A95875@iguana.aciri.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.23i 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 Mon, Oct 29, 2001 at 03:10:06AM -0500, Andrew R. Reiter wrote: > On Mon, 29 Oct 2001, Luigi Rizzo wrote: > : > :I think this is exactly the case where it makes a lot of sense to > :declare vars locally to the block: the start of the function is > :far away, there is a bunch of small conditionals where each > :of them needs to use some temporary variable and those variables > :are meant to be used only within the block. > : > > Yes, but nevertheless, style.9 states it should be so. So unless there is > a move to change style.9, it's pretty much the answer, no? no :) Of course it is subject to interpretation, bue mine is, as i said, > 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! (and btw, i am surely responsible of one of the sections of code that you mentioned as an example). cheers luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message