Date: Wed, 4 Feb 2004 15:39:27 +0100 From: Frode Nordahl <frode@nordahl.net> To: Garrett Wollman <wollman@khavrinen.lcs.mit.edu> Cc: current@FreeBSD.ORG Subject: Re: patch: teaching dump(8) to change tapes Message-ID: <EF318C9B-571F-11D8-B0FA-000A95A9A574@nordahl.net> In-Reply-To: <200402041420.i14EKrV8025518@khavrinen.lcs.mit.edu> References: <Pine.GSO.4.44.0402031816180.18472-100000@elaine2.Stanford.EDU> <8EDE1BA7-56EB-11D8-83F2-000A95A9A574@nordahl.net> <200402041420.i14EKrV8025518@khavrinen.lcs.mit.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 4, 2004, at 15:20, Garrett Wollman wrote: > <<On Wed, 4 Feb 2004 09:24:32 +0100, Frode Nordahl <frode@nordahl.net> > 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 <stdio.h> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EF318C9B-571F-11D8-B0FA-000A95A9A574>