diff options
author | harti <harti@FreeBSD.org> | 2004-12-10 11:58:34 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2004-12-10 11:58:34 +0000 |
commit | d78a3892e06435d8bab8c6519f9c7d54ea83654d (patch) | |
tree | 3f4e059f83a62dbc255aee3e7aef3144c7c1df01 /usr.bin/make | |
parent | e276a7356e5fa8c64cbbd21ec3a5c3774fddc6a5 (diff) | |
download | FreeBSD-src-d78a3892e06435d8bab8c6519f9c7d54ea83654d.zip FreeBSD-src-d78a3892e06435d8bab8c6519f9c7d54ea83654d.tar.gz |
Remove a list that was just used to free all variables just before exiting.
Diffstat (limited to 'usr.bin/make')
-rw-r--r-- | usr.bin/make/var.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c index 8fb594b..7ac597b 100644 --- a/usr.bin/make/var.c +++ b/usr.bin/make/var.c @@ -124,8 +124,6 @@ static char varNoError[] = ""; GNode *VAR_GLOBAL; /* variables from the makefile */ GNode *VAR_CMD; /* variables defined on the command-line */ -static Lst *allVars; /* List of all variables */ - #define FIND_CMD 0x1 /* look in VAR_CMD when searching */ #define FIND_GLOBAL 0x2 /* look in VAR_GLOBAL as well */ #define FIND_ENV 0x4 /* look in the environment also */ @@ -336,7 +334,6 @@ VarAdd(char *name, char *val, GNode *ctxt) v->flags = 0; Lst_AtFront(ctxt->context, v); - Lst_AtEnd(allVars, v); DEBUGF(VAR, ("%s:%s = %s\n", ctxt->name, name, val)); } @@ -383,13 +380,8 @@ Var_Delete(char *name, GNode *ctxt) DEBUGF(VAR, ("%s:delete %s\n", ctxt->name, name)); ln = Lst_Find(ctxt->context, name, VarCmp); if (ln != NULL) { - Var *v; - - v = Lst_Datum(ln); + VarDelete(Lst_Datum(ln)); Lst_Remove(ctxt->context, ln); - ln = Lst_Member(allVars, v); - Lst_Remove(allVars, ln); - VarDelete(v); } } @@ -1928,15 +1920,12 @@ Var_Init(void) VAR_GLOBAL = Targ_NewGN("Global"); VAR_CMD = Targ_NewGN("Command"); - allVars = Lst_Init(); } void Var_End(void) { - - Lst_Destroy(allVars, VarDelete); } |