]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/test/run-06-idle.c
ccan/io: use explicit IO callback functions, instead of io_state values.
[ccan] / ccan / io / test / run-06-idle.c
index acf372f56fe0a287898af6dfc269c497318222bc..597060c2b596f80b5a3b5a43e3539f3371a7fa01 100644 (file)
@@ -16,7 +16,7 @@ struct data {
        char buf[4];
 };
 
        char buf[4];
 };
 
-static struct io_plan *do_read(struct io_conn *conn, struct data *d)
+static struct io_plan *plan_read(struct io_conn *conn, struct data *d)
 {
        ok1(d->state == 2 || d->state == 3);
        d->state++;
 {
        ok1(d->state == 2 || d->state == 3);
        d->state++;
@@ -28,7 +28,7 @@ static struct io_plan *start_waker(struct io_conn *conn, struct data *d)
        ok1(d->state == 1);
        d->state++;
 
        ok1(d->state == 1);
        d->state++;
 
-       io_wake(idler, do_read, d);
+       io_wake(idler, plan_read, d);
        return io_close(conn, NULL);
 }
 
        return io_close(conn, NULL);
 }