]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/benchmarks/run-length-prefix.c
ccan/io: pass struct io_plan explicitly.
[ccan] / ccan / io / benchmarks / run-length-prefix.c
index 74290fd8079ed8dfdbf79c137f393cef82ca4735..2ed9c72933f18d9a15a01f2c711752d0a103e61e 100644 (file)
@@ -25,28 +25,28 @@ struct client {
        char *request_buffer;
 };
 
-static struct io_plan *write_reply(struct io_conn *conn, struct client *client);
-static struct io_plan *read_body(struct io_conn *conn, struct client *client)
+static struct io_plan write_reply(struct io_conn *conn, struct client *client);
+static struct io_plan read_body(struct io_conn *conn, struct client *client)
 {
        assert(client->len <= REQUEST_MAX);
        return io_read(conn, client->request_buffer, client->len,
                       write_reply, client);
 }
 
-static struct io_plan *read_header(struct io_conn *conn, struct client *client)
+static struct io_plan read_header(struct io_conn *conn, struct client *client)
 {
        return io_read(conn, &client->len, sizeof(client->len),
                       read_body, client);
 }
 
 /* once we're done, loop again. */
-static struct io_plan *write_complete(struct io_conn *conn, struct client *client)
+static struct io_plan write_complete(struct io_conn *conn, struct client *client)
 {
        completed++;
        return read_header(conn, client);
 }
 
-static struct io_plan *write_reply(struct io_conn *conn, struct client *client)
+static struct io_plan write_reply(struct io_conn *conn, struct client *client)
 {
        return io_write(conn, &client->len, sizeof(client->len),
                        write_complete, client);
@@ -112,12 +112,12 @@ static void sigalarm(int sig)
        write(timeout[1], "1", 1);
 }
 
-static struct io_plan *do_timeout(struct io_conn *conn, char *buf)
+static struct io_plan do_timeout(struct io_conn *conn, char *buf)
 {
        return io_break(conn, buf, NULL, NULL);
 }
 
-static struct io_plan *do_timeout_read(struct io_conn *conn, char *buf)
+static struct io_plan do_timeout_read(struct io_conn *conn, char *buf)
 {
        return io_read(conn, buf, 1, do_timeout, buf);
 }