bin/71630: [PATCH] cleanup of the usr.sbin/pppd code
brooks at one-eyed-alien.net
Sun Sep 12 22:04:38 PDT 2004
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.
> From: Dan Lukes <dan at obluda.cz>
> To: Giorgos Keramidas <keramida at freebsd.org>
> Cc: bug-followup at 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 at 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
> 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.
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=v assignments should not be used because
they are bogus by inspection.
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-bugs/attachments/20040912/0722749b/attachment.bin
More information about the freebsd-bugs