scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit 87fca601e74e0eab8feb05d49e88429f0008f899
parent d0e5ce814f91b319f4b7bad9f8b571d148c8ebda
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri,  8 Feb 2019 07:49:33 +0000

[libmach] Remove duplicated  delsyms()

Diffstat:
Msrc/libmach/objstrip.c | 18+-----------------
1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/src/libmach/objstrip.c b/src/libmach/objstrip.c @@ -6,22 +6,6 @@ extern stripfun_t stripv[]; -/* TODO: It is better to move this to a common place */ -static void -delsyms(Obj *obj) -{ - Symbol *sym, *next; - - for (sym = obj->head; sym; sym = next) { - next = sym->next; - free(sym->name); - free(sym); - } - - obj->head = NULL; - memset(obj->htab, 0, sizeof(obj->htab)); -} - int objstrip(Obj *obj) { @@ -33,6 +17,6 @@ objstrip(Obj *obj) return -1; fn = stripv[fmt]; (*fn)(obj); - delsyms(obj); + objfree(obj, FREESYM); return 0; }