diff options
author | harti <harti@FreeBSD.org> | 2004-12-10 10:32:10 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2004-12-10 10:32:10 +0000 |
commit | e276a7356e5fa8c64cbbd21ec3a5c3774fddc6a5 (patch) | |
tree | ad2abd3dea99cd930c39cf232988039a4e2650ed /usr.bin/make/targ.c | |
parent | db4fd70037c132dc9adbddf06b51c7bc2decf082 (diff) | |
download | FreeBSD-src-e276a7356e5fa8c64cbbd21ec3a5c3774fddc6a5.zip FreeBSD-src-e276a7356e5fa8c64cbbd21ec3a5c3774fddc6a5.tar.gz |
Remove a list that used to hold all the GNodes just to be able
to free them just before exiting.
Diffstat (limited to 'usr.bin/make/targ.c')
-rw-r--r-- | usr.bin/make/targ.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/usr.bin/make/targ.c b/usr.bin/make/targ.c index 5a93d7f..358399b 100644 --- a/usr.bin/make/targ.c +++ b/usr.bin/make/targ.c @@ -89,7 +89,6 @@ __FBSDID("$FreeBSD$"); #include "dir.h" static Lst *allTargets; /* the list of all targets found so far */ -static Lst *allGNs; /* List of all the GNodes */ static Hash_Table targets; /* a hash table of same */ #define HTSIZE 191 /* initial size of hash table */ @@ -97,7 +96,6 @@ static Hash_Table targets; /* a hash table of same */ static int TargPrintOnlySrc(void *, void *); static int TargPrintName(void *, void *); static int TargPrintNode(void *, void *); -static void TargFreeGN(void *); /*- *----------------------------------------------------------------------- @@ -136,8 +134,6 @@ Targ_End(void) { Lst_Destroy(allTargets, NOFREE); - if (allGNs) - Lst_Destroy(allGNs, TargFreeGN); Hash_DeleteTable(&targets); } @@ -183,46 +179,11 @@ Targ_NewGN(char *name) gn->commands = Lst_Init(); gn->suffix = NULL; - if (allGNs == NULL) - allGNs = Lst_Init(); - Lst_AtEnd(allGNs, (void *)gn); - return (gn); } /*- *----------------------------------------------------------------------- - * TargFreeGN -- - * Destroy a GNode - * - * Results: - * None. - * - * Side Effects: - * None. - *----------------------------------------------------------------------- - */ -static void -TargFreeGN(void *gnp) -{ - GNode *gn = gnp; - - free(gn->name); - free(gn->path); - - Lst_Destroy(gn->iParents, NOFREE); - Lst_Destroy(gn->cohorts, NOFREE); - Lst_Destroy(gn->parents, NOFREE); - Lst_Destroy(gn->children, NOFREE); - Lst_Destroy(gn->successors, NOFREE); - Lst_Destroy(gn->preds, NOFREE); - Lst_Destroy(gn->context, NOFREE); - Lst_Destroy(gn->commands, NOFREE); - free(gn); -} - -/*- - *----------------------------------------------------------------------- * Targ_FindNode -- * Find a node in the list using the given name for matching * |