summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2017-07-24 12:07:47 +0000
committerMarc Espie <espie@cvs.openbsd.org>2017-07-24 12:07:47 +0000
commit73f513db6b0c30845eea8e2418b9fbfba9ed3d1c (patch)
tree38cb2cdf5b8a4f6c68776c28b125e663425f42ca /usr.bin
parentd989e965319b55368e3eeb26d54cb1f6ccf43f5a (diff)
GC old cruft.
noticed and patch Michael W. Bombardieri
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/make/arch.c14
-rw-r--r--usr.bin/make/memory.h6
-rw-r--r--usr.bin/make/suff.c6
3 files changed, 11 insertions, 15 deletions
diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c
index 7d37879f826..990ef352d24 100644
--- a/usr.bin/make/arch.c
+++ b/usr.bin/make/arch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arch.c,v 1.88 2017/07/21 09:29:42 espie Exp $ */
+/* $OpenBSD: arch.c,v 1.89 2017/07/24 12:07:46 espie Exp $ */
/* $NetBSD: arch.c,v 1.17 1996/11/06 17:58:59 christos Exp $ */
/*
@@ -411,7 +411,7 @@ read_archive(const char *archive, const char *earchive)
/* Whole archive read ok. */
if (n == 0 && feof(arch)) {
- efree(list.fnametab);
+ free(list.fnametab);
fclose(arch);
return ar;
}
@@ -495,7 +495,7 @@ read_archive(const char *archive, const char *earchive)
fclose(arch);
ohash_delete(&ar->members);
- efree(list.fnametab);
+ free(list.fnametab);
free(ar);
return NULL;
}
@@ -762,7 +762,7 @@ ArchFindMember(
#endif
if (length == sizeof(arHeaderPtr->ar_name) ||
memberName[length] == ' ') {
- efree(list.fnametab);
+ free(list.fnametab);
return arch;
}
}
@@ -786,7 +786,7 @@ ArchFindMember(
continue;
/* Got the entry. */
if (strcmp(memberName, member) == 0) {
- efree(list.fnametab);
+ free(list.fnametab);
return arch;
}
}
@@ -812,7 +812,7 @@ ArchFindMember(
printf("ArchFind: Extended format entry for %s\n", ename);
/* Found as extended name. */
if (strcmp(ename, member) == 0) {
- efree(list.fnametab);
+ free(list.fnametab);
return arch;
}
}
@@ -826,7 +826,7 @@ ArchFindMember(
/* We did not find the member, or we ran into an error while reading
* the archive. */
#ifdef SVRARCHIVES
- efree(list.fnametab);
+ free(list.fnametab);
#endif
fclose(arch);
return NULL;
diff --git a/usr.bin/make/memory.h b/usr.bin/make/memory.h
index 953db7f8c02..b4884e646ac 100644
--- a/usr.bin/make/memory.h
+++ b/usr.bin/make/memory.h
@@ -1,7 +1,7 @@
#ifndef MEMORY_H
#define MEMORY_H
-/* $OpenBSD: memory.h,v 1.9 2014/05/18 08:08:50 espie Exp $ */
+/* $OpenBSD: memory.h,v 1.10 2017/07/24 12:07:46 espie Exp $ */
/*-
* Copyright (c) 1988, 1989, 1990, 1993
@@ -45,10 +45,6 @@ extern void *ereallocarray(void *, size_t, size_t);
extern int eunlink(const char *);
extern void esetenv(const char *, const char *);
-/* efree(x) works when x==NULL. STDC behavior, may need some different
- * definition for cross-builds on deficient systems */
-#define efree free
-
extern void *hash_calloc(size_t, size_t, void *);
extern void hash_free(void *, void *);
extern void *element_alloc(size_t, void *);
diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c
index c6923861ff0..347b29404d6 100644
--- a/usr.bin/make/suff.c
+++ b/usr.bin/make/suff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: suff.c,v 1.91 2016/10/21 16:12:38 espie Exp $ */
+/* $OpenBSD: suff.c,v 1.92 2017/07/24 12:07:46 espie Exp $ */
/* $NetBSD: suff.c,v 1.13 1996/11/06 17:59:25 christos Exp $ */
/*
@@ -1531,7 +1531,7 @@ sfnd_abort:
* path to be the name so Dir_MTime won't go grovelling
* for it. */
gn->suffix = targ == NULL ? NULL : targ->suff;
- efree(gn->path);
+ free(gn->path);
gn->path = estrdup(gn->name);
}
@@ -1602,7 +1602,7 @@ sfnd_abort:
gn->suffix = src->suff;
/* So Dir_MTime doesn't go questing for it... */
- efree(gn->path);
+ free(gn->path);
gn->path = estrdup(gn->name);
/* Nuke the transformation path and the Src structures left over in the