patch: teaching dump(8) to change tapes
Frode Nordahl
frode at nordahl.net
Wed Feb 4 06:39:31 PST 2004
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
More information about the freebsd-current
mailing list