X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fio%2Ftest%2Frun-05-write.c;h=5319def8f2cc28c6921b2b611a2c99b013b1402d;hp=f8f30ee59194716fb7466a705b02fa40a865c877;hb=96a1ebd3354ef6250e94b509b4e0c0f1ea7e67bb;hpb=34776d3e9ad7de78778306a2d09c2c95df06c902 diff --git a/ccan/io/test/run-05-write.c b/ccan/io/test/run-05-write.c index f8f30ee5..5319def8 100644 --- a/ccan/io/test/run-05-write.c +++ b/ccan/io/test/run-05-write.c @@ -27,9 +27,9 @@ static void init_conn(int fd, struct data *d) { ok1(d->state == 0); d->state++; - if (!io_new_conn(fd, io_write(d->buf, d->bytes, io_close, d), - finish_ok, d)) - abort(); + io_set_finish(io_new_conn(fd, io_write(d->buf, d->bytes, + io_close_cb, d)), + finish_ok, d); } static int make_listen_fd(const char *port, struct addrinfo **info)