scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit bd026f28239671fba0e68d5169cc974f14505f6f
parent 7942db03e1686a900fbfce75474f1d8024392fb4
Author: Quentin Rameau <quinq@fifth.space>
Date:   Tue,  7 Jun 2016 15:24:43 +0200

[driver] use early return logic in linkobjs

Thanks to k0ga for the suggestion.

Diffstat:
Mdriver/posix/scc.c | 9++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/driver/posix/scc.c b/driver/posix/scc.c @@ -282,12 +282,11 @@ linkobjs(void) spawn(LD); validatetools(); - if (!kflag) { - for (i = 0; i < nobjs; ++i) - unlink(tmpobjs[i]); - } + if (kflag) + return; - return; + for (i = 0; i < nobjs; ++i) + unlink(tmpobjs[i]); } static void