From owner-freebsd-current@FreeBSD.ORG Wed Feb 4 06:39:30 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DC27D16A4CF for ; Wed, 4 Feb 2004 06:39:30 -0800 (PST) Received: from smtp1.powertech.no (smtp1.powertech.no [195.159.0.145]) by mx1.FreeBSD.org (Postfix) with ESMTP id 70CAA43D31 for ; Wed, 4 Feb 2004 06:39:29 -0800 (PST) (envelope-from frode@nordahl.net) Received: from [195.159.6.12] (dhcp12.ns5.powertech.no [195.159.6.12]) by smtp1.powertech.no (Postfix) with ESMTP id 535168284; Wed, 4 Feb 2004 15:39:28 +0100 (CET) In-Reply-To: <200402041420.i14EKrV8025518@khavrinen.lcs.mit.edu> References: <8EDE1BA7-56EB-11D8-83F2-000A95A9A574@nordahl.net> <200402041420.i14EKrV8025518@khavrinen.lcs.mit.edu> Mime-Version: 1.0 (Apple Message framework v612) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Frode Nordahl Date: Wed, 4 Feb 2004 15:39:27 +0100 To: Garrett Wollman X-Mailer: Apple Mail (2.612) cc: current@FreeBSD.ORG Subject: Re: patch: teaching dump(8) to change tapes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2004 14:39:31 -0000 On Feb 4, 2004, at 15:20, Garrett Wollman wrote: > < > said: > >> char *host = NULL; /* remote host (if any) */ >> +char *script = NULL; /* name of the script for changing tapes */ > > Both of these initializations serve no purpose. Well, since -F is a optional parameter, and the only place it was initialized was in the getopt switch, I think the initialization to NULL serves a purpose when I'm checking if script is NULL or not to decide if further processing of it is to be done. Example: #include int main (int argc, char **argv) { char *cp1; char *cp2 = NULL; printf ("cp1: %p\ncp2: %p\n", cp1, cp2); } Output: cp1: 0xbfbfed34 cp2: 0x0 > -GAWollman Mvh, Frode