ref: 1cfdd2e710dde04ae54b5332797a25ef1006452e
parent: efc299ce722e23e8732273a3244ffadae9df6407
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Mon Jan 23 07:55:56 EST 2017
[driver] Small aesthetic change in validatetools()
--- a/driver/posix/scc.c
+++ b/driver/posix/scc.c
@@ -296,19 +296,20 @@
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);