Re: suggested patches for netinet6/

From: Luigi Rizzo <rizzo_at_icir.org>
Date: Mon, 12 Apr 2004 23:36:11 -0700
On Tue, Apr 13, 2004 at 03:16:55PM +0900, JINMEI Tatuya / ?$B?_at_L_at_C#:H?(B wrote:
...
> >> > + is it ok to remove the __P() from the header files, ANSIfy
> >> >   the function declarations and make them static as appropriate ?
> >> >   Of course this ought to be done as a separate step.
...
> Out of curiosity (as a novice compiler user), could you be more
> specific on how it helps with stricter compiler checks to remove
> __P()?  For example, what kind of checks does interfere with __P()?

__P() macros only affect readability (and are useless once
you ANSIfy the code) but i can live with that in the interest of
reducing diffs.

Making functions static as much as possible, requiring prototypes
to be present, putting 'const' where possibe, enables the compiler to flag
unused code, misused variables, bad arguments, and so on.
Once again i am not proposing to sweep all the netinet6/ code for
a gratuitous change, just suggesting that where we touch bits of
code in FreeBSD to add locking, change the ARP/ND6 table implementation
and so on, we might as well take the chance to request a bit more help
from the compiler.

	cheers
	luigi
Received on Mon Apr 12 2004 - 21:36:14 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:50 UTC