strdup tracefile so that it doesn't get smashed.

This commit is contained in:
sommerfeld 2000-12-30 02:52:03 +00:00
parent 9984263e63
commit 129b8c6309
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: main.c,v 1.58 2000/12/30 02:05:21 sommerfeld Exp $ */ /* $NetBSD: main.c,v 1.59 2000/12/30 02:52:03 sommerfeld Exp $ */
/* /*
* Copyright (c) 1988, 1989, 1990, 1993 * Copyright (c) 1988, 1989, 1990, 1993
@ -39,7 +39,7 @@
*/ */
#ifdef MAKE_BOOTSTRAP #ifdef MAKE_BOOTSTRAP
static char rcsid[] = "$NetBSD: main.c,v 1.58 2000/12/30 02:05:21 sommerfeld Exp $"; static char rcsid[] = "$NetBSD: main.c,v 1.59 2000/12/30 02:52:03 sommerfeld Exp $";
#else #else
#include <sys/cdefs.h> #include <sys/cdefs.h>
#ifndef lint #ifndef lint
@ -51,7 +51,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993\n\
#if 0 #if 0
static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94";
#else #else
__RCSID("$NetBSD: main.c,v 1.58 2000/12/30 02:05:21 sommerfeld Exp $"); __RCSID("$NetBSD: main.c,v 1.59 2000/12/30 02:52:03 sommerfeld Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
#endif #endif
@ -240,7 +240,7 @@ rearg: while((c = getopt(argc, argv, OPTFLAGS)) != -1) {
Var_Append(MAKEFLAGS, "-S", VAR_GLOBAL); Var_Append(MAKEFLAGS, "-S", VAR_GLOBAL);
break; break;
case 'T': case 'T':
tracefile = optarg; tracefile = estrdup(optarg);
Var_Append(MAKEFLAGS, "-T", VAR_GLOBAL); Var_Append(MAKEFLAGS, "-T", VAR_GLOBAL);
Var_Append(MAKEFLAGS, optarg, VAR_GLOBAL); Var_Append(MAKEFLAGS, optarg, VAR_GLOBAL);
break; break;