Date: Fri, 12 Jul 2002 10:00:10 +0200 From: Thomas Quinot <thomas@cuivre.fr.eu.org> To: Alfred Perlstein <bright@mu.org> Cc: bde@freebsd.org, audit@freebsd.org Subject: Re: trpt cleanup Message-ID: <20020712100010.B50744@melusine.cuivre.fr.eu.org> In-Reply-To: <20020711224521.GD97638@elvis.mu.org>; from bright@mu.org on Thu, Jul 11, 2002 at 03:45:21PM -0700 References: <20020711224521.GD97638@elvis.mu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Thomas.
--
Thomas.Quinot@Cuivre.FR.EU.ORG
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020712100010.B50744>
