suggested patches for netinet6/

Luigi Rizzo rizzo at
Mon Apr 12 23:36:14 PDT 2004

On Tue, Apr 13, 2004 at 03:16:55PM +0900, JINMEI Tatuya / ?$B?@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.


More information about the freebsd-current mailing list