X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fio%2Ftest%2Frun-13-all-idle.c;fp=ccan%2Fio%2Ftest%2Frun-13-all-idle.c;h=f8ee97f805ca791ffdc5c9417176e8d8de2d5656;hb=cdffdf5d61f8330cfc3467e73a84876eb3928e9b;hp=31510007a90114c786c9b95a1ba1959b35b6a0e0;hpb=12e924346b342c61219a3fdc57eb6b00a27f1cd1;p=ccan diff --git a/ccan/io/test/run-13-all-idle.c b/ccan/io/test/run-13-all-idle.c index 31510007..f8ee97f8 100644 --- a/ccan/io/test/run-13-all-idle.c +++ b/ccan/io/test/run-13-all-idle.c @@ -7,6 +7,11 @@ #include #include +static struct io_plan *setup_waiter(struct io_conn *conn, int *status) +{ + return io_wait(conn, status, IO_IN, io_close_cb, NULL); +} + int main(void) { int status; @@ -17,7 +22,7 @@ int main(void) int fds[2]; ok1(pipe(fds) == 0); - io_new_conn(fds[0], io_wait(&status, io_close_cb, NULL)); + io_new_conn(NULL, fds[0], setup_waiter, &status); io_loop(); exit(1); }