From owner-freebsd-bugs@FreeBSD.ORG Mon Sep 13 05:04:38 2004 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F69D16A4CE for ; Mon, 13 Sep 2004 05:04:38 +0000 (GMT) Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6A25643D45 for ; Mon, 13 Sep 2004 05:04:38 +0000 (GMT) (envelope-from brdavis@odin.ac.hmc.edu) Received: from odin.ac.hmc.edu (localhost.localdomain [127.0.0.1]) by odin.ac.hmc.edu (8.13.0/8.13.0) with ESMTP id i8D55DBc024380; Sun, 12 Sep 2004 22:05:13 -0700 Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.13.0/8.13.0/Submit) id i8D55DMn024379; Sun, 12 Sep 2004 22:05:13 -0700 Date: Sun, 12 Sep 2004 22:05:13 -0700 From: Brooks Davis To: Dan Lukes Message-ID: <20040913050513.GA22473@odin.ac.hmc.edu> References: <200409130110.i8D1AN1w061311@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0F1p//8PRICkK4MW" Content-Disposition: inline In-Reply-To: <200409130110.i8D1AN1w061311@freefall.freebsd.org> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on odin.ac.hmc.edu cc: freebsd-bugs@freebsd.org Subject: Re: bin/71630: [PATCH] cleanup of the usr.sbin/pppd code X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2004 05:04:38 -0000 --0F1p//8PRICkK4MW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 13, 2004 at 01:10:23AM +0000, Dan Lukes wrote: > The following reply was made to PR bin/71630; it has been noted by GNATS. >=20 > From: Dan Lukes > To: Giorgos Keramidas > Cc: bug-followup@freebsd.org > Subject: Re: bin/71630: [PATCH] cleanup of the usr.sbin/pppd code > Date: Mon, 13 Sep 2004 03:07:18 +0200 (CEST) >=20 > On Sun, 12 Sep 2004, Giorgos Keramidas wrote: > =20 > > On 2004-09-12 04:38, Dan Lukes wrote: > >> - FILE *iffile; > >> + FILE *iffile =3D iffile; /* to avoid "may be used unitialized" = warning */ > > > > Nope. NULL is the proper initialization value for (FILE *) objects. > > This way any bugs that might exist further down will be exposed by a > > dereference of a NULL pointer which everyone will notice. Hiding the > =20 > True initialisation is not necesarry with current code, so > it's waste of resources now. > =20 > I like defensive style of programming, but it has negative impact on > performance. > =20 > Somebody should evaluate if we can live with unnecesarry > initialisation here. If yes, it's better patch to iffile=3DNULL, if not,= my > patch is better. I find it extreamly hard to believe you could demonstrate the performance difference in a microbenchmark, much less a real application. Frankly, unless you can prove a real initalization causes a real performance problem, v=3Dv assignments should not be used because they are bogus by inspection. -- Brooks --=20 Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 --0F1p//8PRICkK4MW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBRSqIXY6L6fI4GtQRAonkAKCSIar0VX7wrD8bOaKVQ5fLr8wVBwCg54pY LQMCX5bNudzFqVSLVFwRRDU= =ejYQ -----END PGP SIGNATURE----- --0F1p//8PRICkK4MW--