commit 17296a6730a37f0f80642a1d8fb08c582f104362
Author: Roberto E. Vargas Caballero <[email protected]>
AuthorDate: Mon Jan 23 12:55:56 2017 +0100
Commit: Roberto E. Vargas Caballero <[email protected]>
CommitDate: Mon Jan 23 12:55:56 2017 +0100
[driver] Small aesthetic change in validatetools()
diff --git a/driver/posix/scc.c b/driver/posix/scc.c
index bd4cafe..7cc1a3f 100644
--- 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);