Date: Sun, 12 Sep 2004 22:05:13 -0700 From: Brooks Davis <brooks@one-eyed-alien.net> To: Dan Lukes <dan@obluda.cz> Cc: freebsd-bugs@freebsd.org Subject: Re: bin/71630: [PATCH] cleanup of the usr.sbin/pppd code Message-ID: <20040913050513.GA22473@odin.ac.hmc.edu> In-Reply-To: <200409130110.i8D1AN1w061311@freefall.freebsd.org> References: <200409130110.i8D1AN1w061311@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <dan@obluda.cz> > To: Giorgos Keramidas <keramida@freebsd.org> > 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 <dan@obluda.cz> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040913050513.GA22473>