X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;ds=inline;f=ccan%2Fio%2Ftest%2Frun-06-idle.c;h=d75a216db6a48d5cbc68aa6a093e4ba7c0496c77;hb=109f8003b603675aec35e5b1fc678ee363e2f30c;hp=fb681a08fcf60d920141c2044335b6fc01570c26;hpb=57d9d1be33905691ec756b14b066181ca6850ced;p=ccan diff --git a/ccan/io/test/run-06-idle.c b/ccan/io/test/run-06-idle.c index fb681a08..d75a216d 100644 --- a/ccan/io/test/run-06-idle.c +++ b/ccan/io/test/run-06-idle.c @@ -37,6 +37,11 @@ static void finish_idle(struct io_conn *conn, struct data *d) io_break(d, io_idle()); } +static struct io_plan never(struct io_conn *conn, void *arg) +{ + abort(); +} + static void init_conn(int fd, struct data *d) { int fd2; @@ -48,7 +53,7 @@ static void init_conn(int fd, struct data *d) /* This will wake us up, as read will fail. */ fd2 = open("/dev/null", O_RDONLY); ok1(fd2 >= 0); - ok1(io_new_conn(fd2, io_read(idler, 1, NULL, NULL), finish_waker, d)); + ok1(io_new_conn(fd2, io_read(idler, 1, never, NULL), finish_waker, d)); } static int make_listen_fd(const char *port, struct addrinfo **info)