]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/test/run-10-many.c
ccan/io: pass struct io_plan explicitly.
[ccan] / ccan / io / test / run-10-many.c
index 313691187f6c63d059f03f0144e5a1fa6f2c48be..91b335e103216a4b371233d266a36cb0c8216e5f 100644 (file)
@@ -15,10 +15,10 @@ struct buffer {
        char buf[32];
 };
 
-static struct io_plan *poke_writer(struct io_conn *conn, struct buffer *buf);
-static struct io_plan *poke_reader(struct io_conn *conn, struct buffer *buf);
+static struct io_plan poke_writer(struct io_conn *conn, struct buffer *buf);
+static struct io_plan poke_reader(struct io_conn *conn, struct buffer *buf);
 
-static struct io_plan *plan_read(struct io_conn *conn, struct buffer *buf)
+static struct io_plan plan_read(struct io_conn *conn, struct buffer *buf)
 {
        assert(conn == buf->reader);
 
@@ -26,7 +26,7 @@ static struct io_plan *plan_read(struct io_conn *conn, struct buffer *buf)
                       poke_writer, buf);
 }
 
-static struct io_plan *plan_write(struct io_conn *conn, struct buffer *buf)
+static struct io_plan plan_write(struct io_conn *conn, struct buffer *buf)
 {
        assert(conn == buf->writer);
 
@@ -34,7 +34,7 @@ static struct io_plan *plan_write(struct io_conn *conn, struct buffer *buf)
                        poke_reader, buf);
 }
 
-static struct io_plan *poke_writer(struct io_conn *conn, struct buffer *buf)
+static struct io_plan poke_writer(struct io_conn *conn, struct buffer *buf)
 {
        assert(conn == buf->reader);
 
@@ -48,7 +48,7 @@ static struct io_plan *poke_writer(struct io_conn *conn, struct buffer *buf)
        return io_idle(conn);
 }
 
-static struct io_plan *poke_reader(struct io_conn *conn, struct buffer *buf)
+static struct io_plan poke_reader(struct io_conn *conn, struct buffer *buf)
 {
        assert(conn == buf->writer);
        /* You read. */
@@ -61,7 +61,7 @@ static struct io_plan *poke_reader(struct io_conn *conn, struct buffer *buf)
        return io_idle(conn);
 }
 
-static struct io_plan *reader(struct io_conn *conn, struct buffer *buf)
+static struct io_plan reader(struct io_conn *conn, struct buffer *buf)
 {
        assert(conn == buf->reader);