scc

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

commit 17296a6730a37f0f80642a1d8fb08c582f104362
parent 60bbc9b93785a652d0f89146e3eefe9d2d0fb52b
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Mon, 23 Jan 2017 12:55:56 +0100

[driver] Small aesthetic change in validatetools()

Diffstat:
Mdriver/posix/scc.c | 25+++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/driver/posix/scc.c b/driver/posix/scc.c @@ -296,19 +296,20 @@ validatetools(void) for (tool = 0; tool < LAST_TOOL; ++tool) { t = &tools[tool]; - if (t->pid) { - if (waitpid(t->pid, &st, 0) < 0 || - !WIFEXITED(st) || WEXITSTATUS(st) != 0) { - failure = 1; - failed = tool; - } - if (tool >= failed && t->outfile) - unlink(t->outfile); - for (i = t->nparams; i < t->args.n; ++i) - free(t->args.s[i]); - t->args.n = t->nparams; - t->pid = 0; + if (!t->pid) + continue; + if (waitpid(t->pid, &st, 0) < 0 || + !WIFEXITED(st) || + WEXITSTATUS(st) != 0) { + failure = 1; + failed = tool; } + if (tool >= failed && t->outfile) + unlink(t->outfile); + for (i = t->nparams; i < t->args.n; ++i) + free(t->args.s[i]); + t->args.n = t->nparams; + t->pid = 0; } if (failed < LAST_TOOL) { unlink(objfile);