From 19446efc0639b6032e39b88ba19fea91c62ee9d6 Mon Sep 17 00:00:00 2001 From: Hartmut Brandt Date: Tue, 24 May 2005 15:58:35 +0000 Subject: Get rid of the third argument to Var_Value() the pointer it pointed to has always been set to NULL for some time now. Obtained from: DragonFlyBSD --- usr.bin/make/make.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'usr.bin/make/make.c') diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c index 5402db6a0085..8a460f1118de 100644 --- a/usr.bin/make/make.c +++ b/usr.bin/make/make.c @@ -341,12 +341,9 @@ Make_Update(GNode *cgn) GNode *pgn; /* the parent node */ char *cname; /* the child's name */ LstNode *ln; /* Element in parents and iParents lists */ - char *p1; - char *ptr; char *cpref; - cname = Var_Value(TARGET, cgn, &p1); - free(p1); + cname = Var_Value(TARGET, cgn); /* * If the child was actually made, see what its modification time is @@ -464,7 +461,7 @@ Make_Update(GNode *cgn) * Set the .PREFIX and .IMPSRC variables for all the implied parents * of this node. */ - cpref = Var_Value(PREFIX, cgn, &ptr); + cpref = Var_Value(PREFIX, cgn); for (ln = Lst_First(&cgn->iParents); ln != NULL; ln = Lst_Succ(ln)) { pgn = Lst_Datum(ln); if (pgn->make) { @@ -472,7 +469,6 @@ Make_Update(GNode *cgn) Var_Set(PREFIX, cpref, pgn); } } - free(ptr); } /** @@ -498,7 +494,6 @@ Make_DoAllVar(GNode *gn) LstNode *ln; GNode *cgn; char *child; - char *p1; LST_FOREACH(ln, &gn->children) { /* @@ -517,7 +512,6 @@ Make_DoAllVar(GNode *gn) cgn = Lst_Datum(ln); if ((cgn->type & (OP_EXEC | OP_USE | OP_INVISIBLE)) == 0) { - p1 = NULL; if (OP_NOP(cgn->type)) { /* * this node is only source; use the specific @@ -525,7 +519,7 @@ Make_DoAllVar(GNode *gn) */ child = cgn->path ? cgn->path : cgn->name; } else - child = Var_Value(TARGET, cgn, &p1); + child = Var_Value(TARGET, cgn); Var_Append(ALLSRC, child, gn); if (gn->type & OP_JOIN) { if (cgn->made == MADE) { @@ -554,7 +548,6 @@ Make_DoAllVar(GNode *gn) */ Var_Append(OODATE, child, gn); } - free(p1); } } @@ -566,8 +559,7 @@ Make_DoAllVar(GNode *gn) } if (gn->type & OP_JOIN) { - Var_Set(TARGET, Var_Value(ALLSRC, gn, &p1), gn); - free(p1); + Var_Set(TARGET, Var_Value(ALLSRC, gn), gn); } } -- cgit v1.3