Re: patch: teaching dump(8) to change tapes

From: Frode Nordahl <frode_at_nordahl.net>
Date: Wed, 4 Feb 2004 15:39:27 +0100
On Feb 4, 2004, at 15:20, Garrett Wollman wrote:

> <<On Wed, 4 Feb 2004 09:24:32 +0100, Frode Nordahl <frode_at_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
Received on Wed Feb 04 2004 - 05:39:30 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:41 UTC