Re: trpt cleanup
Alfred Perlstein <[email protected]> Fri, 12 Jul 2002 01:06:08 -0700
| Newsgroups | gmane.os.freebsd.devel.audit |
|---|---|
| Message-ID | <[email protected]> |
* Thomas Quinot <[email protected]> [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 [[email protected]] '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 [email protected] with "unsubscribe freebsd-audit" in the body of the message