From owner-freebsd-current@FreeBSD.ORG Mon Apr 12 23:36:14 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B7A7516A4CE; Mon, 12 Apr 2004 23:36:14 -0700 (PDT) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5CE343D4C; Mon, 12 Apr 2004 23:36:14 -0700 (PDT) (envelope-from rizzo@icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.9p1/8.12.8) with ESMTP id i3D6aEgd048150; Mon, 12 Apr 2004 23:36:14 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.9p1/8.12.3/Submit) id i3D6aBgU048149; Mon, 12 Apr 2004 23:36:11 -0700 (PDT) (envelope-from rizzo) Date: Mon, 12 Apr 2004 23:36:11 -0700 From: Luigi Rizzo To: "JINMEI Tatuya / ?$B?@L@C#:H?(B" Message-ID: <20040412233611.A46933@xorpc.icir.org> References: <20040409042720.A99087@xorpc.icir.org> <20040412075638.B67293@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from jinmei@isl.rdc.toshiba.co.jp on Tue, Apr 13, 2004 at 03:16:55PM +0900 cc: net@freebsd.org cc: core@kame.net cc: andre@freebsd.org cc: ume@freebsd.org cc: current@freebsd.org Subject: Re: suggested patches for netinet6/ X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2004 06:36:14 -0000 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