scc

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

commit d596976f8d6082ec001da268c92f99c70218000c
parent b59bea95dd035998d30197a1060b744c09c7a69f
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun, 12 Jan 2025 20:08:29 +0100

libmach/coff32: Simplify coff32strip()

Diffstat:
Msrc/libmach/coff32/coff32strip.c | 10++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/libmach/coff32/coff32strip.c b/src/libmach/coff32/coff32strip.c @@ -20,19 +20,17 @@ coff32strip(Obj *obj) scn->s_relptr = 0; scn->s_nlnno = 0; scn->s_lnnoptr = 0; - } - - hdr->f_nsyms = 0; - hdr->f_symptr = 0; - hdr->f_flags |= F_RELFLG | F_LMNO | F_LSYMS; - for (i = 0; i < coff->hdr.f_nscns; i++) { if (coff->rels) free(coff->rels[i]); if (coff->lines) free(coff->lines[i]); } + hdr->f_nsyms = 0; + hdr->f_symptr = 0; + hdr->f_flags |= F_RELFLG | F_LMNO | F_LSYMS; + free(coff->ents); free(coff->rels); free(coff->lines);