From owner-freebsd-audit Fri Jul 12 1: 6:12 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9847D37B400; Fri, 12 Jul 2002 01:06:09 -0700 (PDT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AD7643E4A; Fri, 12 Jul 2002 01:06:09 -0700 (PDT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id DDF00AE279; Fri, 12 Jul 2002 01:06:08 -0700 (PDT) Date: Fri, 12 Jul 2002 01:06:08 -0700 From: Alfred Perlstein To: Thomas Quinot Cc: bde@freebsd.org, audit@freebsd.org Subject: Re: trpt cleanup Message-ID: <20020712080608.GI97638@elvis.mu.org> References: <20020711224521.GD97638@elvis.mu.org> <20020712100010.B50744@melusine.cuivre.fr.eu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20020712100010.B50744@melusine.cuivre.fr.eu.org> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Thomas Quinot [020712 01:00] wrote: > Le 2002-07-12, Alfred Perlstein écrivait : > > > -struct nlist nl[] = { > > +struct nlist nl[3]; > > #define N_TCP_DEBUG 0 > > - { "_tcp_debug" }, > > #define N_TCP_DEBX 1 > > - { "_tcp_debx" }, > > - { "" }, > > -}; > > This change, and the corresponding initialization added to main(), > is questionable. Having an explicit element count, rather than an > initializer, for nl means that the information of many elements there > are in nl is sprinkled all over the place (here where nl is declared, > and then also at the place where the array is initialized), and that > both places need to be kept consistent by hand. Keeping things > consistent is a job that compilers do very well, but that programmers > tend to botch from time to time: better leave it to the compiler. Any suggestions for a workaround? -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message