Hi,

Some parts of make(1) use free() and others use efree() but
efree is just a define for free. Remove efree?

- Michael


Index: arch.c
===================================================================
RCS file: /cvs/src/usr.bin/make/arch.c,v
retrieving revision 1.88
diff -u -p -u -r1.88 arch.c
--- arch.c      21 Jul 2017 09:29:42 -0000      1.88
+++ arch.c      24 Jul 2017 02:43:08 -0000
@@ -411,7 +411,7 @@ read_archive(const char *archive, const 
 
                /*  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 
 
        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;
Index: suff.c
===================================================================
RCS file: /cvs/src/usr.bin/make/suff.c,v
retrieving revision 1.91
diff -u -p -u -r1.91 suff.c
--- suff.c      21 Oct 2016 16:12:38 -0000      1.91
+++ suff.c      24 Jul 2017 02:43:09 -0000
@@ -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
Index: memory.h
===================================================================
RCS file: /cvs/src/usr.bin/make/memory.h,v
retrieving revision 1.9
diff -u -p -u -r1.9 memory.h
--- memory.h    18 May 2014 08:08:50 -0000      1.9
+++ memory.h    24 Jul 2017 02:43:09 -0000
@@ -45,10 +45,6 @@ extern void *ereallocarray(void *, size_
 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 *);

Reply via email to