X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftap%2Ftest%2Frun.c;h=fb039a895c12181c43664d66e83b86b532824651;hp=efc8134dcbd273edd34a8269220486ada6dbc278;hb=532feb88f516f0848ae0e3eaf3a89a1fc94db6c4;hpb=458831cf788f21f8588bad7d7490f729361fc136 diff --git a/ccan/tap/test/run.c b/ccan/tap/test/run.c index efc8134d..fb039a89 100644 --- a/ccan/tap/test/run.c +++ b/ccan/tap/test/run.c @@ -25,7 +25,7 @@ static void write_all(int fd, const void *data, size_t size) done = write(fd, data, size); if (done <= 0) _exit(1); - data += done; + data = (const char *)data + done; size -= done; } } @@ -66,8 +66,8 @@ int main(int argc, char *argv[]) int p[2]; int stdoutfd; + setbuf(stdout, 0); printf("1..1\n"); - fflush(stdout); stderrfd = dup(STDERR_FILENO); if (stderrfd < 0) err(1, "dup of stderr failed");