Date: Mon, 13 Sep 2004 01:10:23 GMT From: Dan Lukes <dan@obluda.cz> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/71630: [PATCH] cleanup of the usr.sbin/pppd code Message-ID: <200409130110.i8D1AN1w061311@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/71630; it has been noted by GNATS. 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) On Sun, 12 Sep 2004, Giorgos Keramidas wrote: > On 2004-09-12 04:38, Dan Lukes <dan@obluda.cz> wrote: >> - FILE *iffile; >> + FILE *iffile = 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 True initialisation is not necesarry with current code, so it's waste of resources now. I like defensive style of programming, but it has negative impact on performance. Somebody should evaluate if we can live with unnecesarry initialisation here. If yes, it's better patch to iffile=NULL, if not, my patch is better. Dan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409130110.i8D1AN1w061311>