]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/test/run-18-errno.c
io: allow freeing of io_conn at any time.
[ccan] / ccan / io / test / run-18-errno.c
index 75d84cca1f64a5520698597352769ca3e14f1e92..904a20cafc4cc735339e216c1fcd93c99e528216 100644 (file)
@@ -27,8 +27,8 @@ static struct io_plan *init_conn(struct io_conn *conn, int *state)
 {
        if (*state == 0) {
                (*state)++;
-               errno = 100;
                io_set_finish(conn, finish_100, state);
+               errno = 100;
                return io_close(conn);
        } else {
                ok1(*state == 2);