X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=tools%2Fccanlint%2Fasync.c;h=4f51dd62db942d7a4d4f63a9e33ec98d6e85906d;hp=5c2c4da73d31b1929b1dd25fcaa513c1b2337e92;hb=add10b0b9d13d9437682268badfab029ed36c244;hpb=37965b33eeb202773dc70c4546d0b050b8e717b5 diff --git a/tools/ccanlint/async.c b/tools/ccanlint/async.c index 5c2c4da7..4f51dd62 100644 --- a/tools/ccanlint/async.c +++ b/tools/ccanlint/async.c @@ -47,10 +47,12 @@ static void run_more(void) while (num_running < lbalance_target(lb)) { int p[2]; - c = tlist_top(&pending, struct command, list); + + c = tlist_top(&pending, list); if (!c) break; + fflush(stdout); if (pipe(p) != 0) err(1, "Pipe failed"); c->pid = fork(); @@ -187,7 +189,7 @@ void *collect_command(bool *ok, char **output) struct command *c; const void *ctx; - while ((c = tlist_top(&done, struct command, list)) == NULL) { + while ((c = tlist_top(&done, list)) == NULL) { if (tlist_empty(&pending) && tlist_empty(&running)) return NULL; reap_output();