diff options
author | jmallett <jmallett@FreeBSD.org> | 2002-10-23 23:16:43 +0000 |
---|---|---|
committer | jmallett <jmallett@FreeBSD.org> | 2002-10-23 23:16:43 +0000 |
commit | 435bfdfa4436731362eb9fac66643198e6e238e4 (patch) | |
tree | bbd5e7ccf4fc366bc27a8cad8364cb37e593aa28 /usr.bin | |
parent | d98de7a2cf71a2e2d7fa1681696f9e0784cf85a5 (diff) | |
download | FreeBSD-src-435bfdfa4436731362eb9fac66643198e6e238e4.zip FreeBSD-src-435bfdfa4436731362eb9fac66643198e6e238e4.tar.gz |
Remove efree(), it isn't used consistently enough to even pretend that it
might help on the systems it could possibly be used as a bandaid for. In
fact, the only thing it's useful for is instrumenting free(3) calls, and in
that capacity, it's better served as a local patch, than a public wrapper.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/make/arch.c | 12 | ||||
-rw-r--r-- | usr.bin/make/compat.c | 8 | ||||
-rw-r--r-- | usr.bin/make/cond.c | 2 | ||||
-rw-r--r-- | usr.bin/make/job.c | 2 | ||||
-rw-r--r-- | usr.bin/make/main.c | 4 | ||||
-rw-r--r-- | usr.bin/make/make.c | 8 | ||||
-rw-r--r-- | usr.bin/make/nonints.h | 3 | ||||
-rw-r--r-- | usr.bin/make/str.c | 4 | ||||
-rw-r--r-- | usr.bin/make/suff.c | 6 | ||||
-rw-r--r-- | usr.bin/make/targ.c | 2 |
10 files changed, 24 insertions, 27 deletions
diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c index 063ad7a..e79d383 100644 --- a/usr.bin/make/arch.c +++ b/usr.bin/make/arch.c @@ -149,7 +149,7 @@ ArchFree(void *ap) free(Hash_GetValue(entry)); free(a->name); - efree(a->fnametab); + free(a->fnametab); Hash_DeleteTable(&a->members); free(a); } @@ -650,7 +650,7 @@ ArchStatMember (char *archive, char *member, Boolean hash) badarch: fclose (arch); Hash_DeleteTable (&ar->members); - efree(ar->fnametab); + free(ar->fnametab); free (ar); return (NULL); } @@ -915,8 +915,8 @@ Arch_Touch (GNode *gn) arch = ArchFindMember(Var_Value (ARCHIVE, gn, &p1), Var_Value (TARGET, gn, &p2), &arh, "r+"); - efree(p1); - efree(p2); + free(p1); + free(p2); snprintf(arh.ar_date, sizeof(arh.ar_date), "%-12ld", (long) now); if (arch != NULL) { @@ -986,8 +986,8 @@ Arch_MTime(GNode *gn) arhPtr = ArchStatMember (Var_Value (ARCHIVE, gn, &p1), Var_Value (TARGET, gn, &p2), TRUE); - efree(p1); - efree(p2); + free(p1); + free(p2); if (arhPtr != NULL) { modTime = (int) strtol(arhPtr->ar_date, NULL, 10); diff --git a/usr.bin/make/compat.c b/usr.bin/make/compat.c index 29e89a6..3e2d9c9 100644 --- a/usr.bin/make/compat.c +++ b/usr.bin/make/compat.c @@ -115,7 +115,7 @@ CompatInterrupt (int signo) if (!noExecute && eunlink(file) != -1) { printf ("*** %s removed\n", file); } - efree(p1); + free(p1); /* * Run .INTERRUPT only if hit with interrupt signal @@ -435,7 +435,7 @@ CompatMake (void *gnp, void *pgnp) if (Lst_Member (gn->iParents, pgn) != NULL) { char *p1; Var_Set (IMPSRC, Var_Value(TARGET, gn, &p1), pgn); - efree(p1); + free(p1); } /* @@ -569,7 +569,7 @@ CompatMake (void *gnp, void *pgnp) char *p1; printf ("\n\nStop in %s.\n", Var_Value(".CURDIR", gn, &p1)); - efree(p1); + free(p1); exit (1); } } else if (gn->made == ERROR) { @@ -582,7 +582,7 @@ CompatMake (void *gnp, void *pgnp) if (Lst_Member (gn->iParents, pgn) != NULL) { char *p1; Var_Set (IMPSRC, Var_Value(TARGET, gn, &p1), pgn); - efree(p1); + free(p1); } switch(gn->made) { case BEINGMADE: diff --git a/usr.bin/make/cond.c b/usr.bin/make/cond.c index a6eb9a9..6f82ecb 100644 --- a/usr.bin/make/cond.c +++ b/usr.bin/make/cond.c @@ -284,7 +284,7 @@ CondDoDefined (int argLen, char *arg) } else { result = FALSE; } - efree(p1); + free(p1); arg[argLen] = savec; return (result); } diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c index d83f8eb..b25edd8 100644 --- a/usr.bin/make/job.c +++ b/usr.bin/make/job.c @@ -1070,7 +1070,7 @@ Job_CheckCommands(GNode *gn, void (*abortProc)(const char *, ...)) */ Make_HandleUse(DEFAULT, gn); Var_Set(IMPSRC, Var_Value(TARGET, gn, &p1), gn); - efree(p1); + free(p1); } else if (Dir_MTime(gn) == 0) { /* * The node wasn't the target of an operator we have no .DEFAULT diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index c708cff..e80ff06 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -759,7 +759,7 @@ main(int argc, char **argv) (void)ReadMakefile(".depend", NULL); Var_Append("MFLAGS", Var_Value(MAKEFLAGS, VAR_GLOBAL, &p1), VAR_GLOBAL); - efree(p1); + free(p1); /* Install all the flags into the MAKE envariable. */ if (((p = Var_Value(MAKEFLAGS, VAR_GLOBAL, &p1)) != NULL) && *p) @@ -768,7 +768,7 @@ main(int argc, char **argv) #else setenv("MAKE", p, 1); #endif - efree(p1); + free(p1); /* * For compatibility, look at the directories in the VPATH variable diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c index 653bd21..762b65a 100644 --- a/usr.bin/make/make.c +++ b/usr.bin/make/make.c @@ -375,7 +375,7 @@ Make_Update (GNode *cgn) char *p1; cname = Var_Value (TARGET, cgn, &p1); - efree(p1); + free(p1); /* * If the child was actually made, see what its modification time is @@ -502,7 +502,7 @@ Make_Update (GNode *cgn) Var_Set (PREFIX, cpref, pgn); } } - efree(ptr); + free(ptr); Lst_Close (cgn->iParents); } } @@ -570,7 +570,7 @@ MakeAddAllSrc (void *cgnp, void *pgnp) */ Var_Append(OODATE, child, pgn); } - efree(p1); + free(p1); } return (0); } @@ -612,7 +612,7 @@ Make_DoAllVar (GNode *gn) if (gn->type & OP_JOIN) { char *p1; Var_Set (TARGET, Var_Value (ALLSRC, gn, &p1), gn); - efree(p1); + free(p1); } } diff --git a/usr.bin/make/nonints.h b/usr.bin/make/nonints.h index 0b08e16..a9720c5 100644 --- a/usr.bin/make/nonints.h +++ b/usr.bin/make/nonints.h @@ -73,9 +73,6 @@ int PrintAddr(void *, void *); void Finish(int); char *estrdup(const char *); void *emalloc(size_t); -/* efree(x) works when x==NULL. STDC behavior, may need some different - * definition for cross-builds on deficient systems */ -#define efree free void *erealloc(void *, size_t); void enomem(void); int eunlink(const char *); diff --git a/usr.bin/make/str.c b/usr.bin/make/str.c index af5a239..56cb71f 100644 --- a/usr.bin/make/str.c +++ b/usr.bin/make/str.c @@ -115,8 +115,8 @@ str_concat(char *s1, char *s2, int flags) /* free original strings */ if (flags & STR_DOFREE) { - (void)efree(s1); - (void)efree(s2); + (void)free(s1); + (void)free(s2); } return(result); } diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c index 688f320..b6eb124 100644 --- a/usr.bin/make/suff.c +++ b/usr.bin/make/suff.c @@ -1633,7 +1633,7 @@ SuffFindArchiveDeps(GNode *gn, Lst slst) for (i = (sizeof(copy)/sizeof(copy[0]))-1; i >= 0; i--) { char *p1; Var_Set(copy[i], Var_Value(copy[i], mem, &p1), gn); - efree(p1); + free(p1); } @@ -1955,7 +1955,7 @@ sfnd_abort: gn->suffix = (targ == NULL) ? NULL : targ->suff; if (gn->suffix) gn->suffix->refCount++; - efree(gn->path); + free(gn->path); gn->path = estrdup(gn->name); } @@ -2055,7 +2055,7 @@ sfnd_abort: /* * So Dir_MTime doesn't go questing for it... */ - efree(gn->path); + free(gn->path); gn->path = estrdup(gn->name); /* diff --git a/usr.bin/make/targ.c b/usr.bin/make/targ.c index 2d0f1c3..ca8a718 100644 --- a/usr.bin/make/targ.c +++ b/usr.bin/make/targ.c @@ -207,7 +207,7 @@ TargFreeGN (void *gnp) free(gn->name); - efree(gn->path); + free(gn->path); Lst_Destroy(gn->iParents, NOFREE); Lst_Destroy(gn->cohorts, NOFREE); |