From owner-freebsd-bugs@FreeBSD.ORG Mon Sep 13 01:10:24 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2EE0216A4CE for ; Mon, 13 Sep 2004 01:10:24 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 23E6343D48 for ; Mon, 13 Sep 2004 01:10:24 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i8D1AORd061314 for ; Mon, 13 Sep 2004 01:10:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i8D1AN1w061311; Mon, 13 Sep 2004 01:10:23 GMT (envelope-from gnats) Date: Mon, 13 Sep 2004 01:10:23 GMT Message-Id: <200409130110.i8D1AN1w061311@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Dan Lukes 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 Reply-To: Dan Lukes List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2004 01:10:24 -0000 The following reply was made to PR bin/71630; it has been noted by GNATS. 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) On Sun, 12 Sep 2004, Giorgos Keramidas wrote: > On 2004-09-12 04:38, Dan Lukes 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