Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Apr 2004 23:36:11 -0700
From:      Luigi Rizzo <rizzo@icir.org>
To:        "JINMEI Tatuya / ?$B?@L@C#:H?(B" <jinmei@isl.rdc.toshiba.co.jp>
Cc:        current@freebsd.org
Subject:   Re: suggested patches for netinet6/
Message-ID:  <20040412233611.A46933@xorpc.icir.org>
In-Reply-To: <y7vd66cv1uw.wl@ocean.jinmei.org>; from jinmei@isl.rdc.toshiba.co.jp on Tue, Apr 13, 2004 at 03:16:55PM %2B0900
References:  <20040409042720.A99087@xorpc.icir.org> <y7v7jwlw9ib.wl@ocean.jinmei.org> <20040412075638.B67293@xorpc.icir.org> <y7vd66cv1uw.wl@ocean.jinmei.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 13, 2004 at 03:16:55PM +0900, JINMEI Tatuya / ?$B?@L@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040412233611.A46933>