]> git.ozlabs.org Git - ccan/blobdiff - ccan/io/test/run-18-errno.c
Makefile: fix fastcheck.
[ccan] / ccan / io / test / run-18-errno.c
index f67c0eb02996cfac59b81640b8be3bd875a5537e..904a20cafc4cc735339e216c1fcd93c99e528216 100644 (file)
@@ -6,9 +6,7 @@
 #include <sys/wait.h>
 #include <stdio.h>
 
-#ifndef PORT
 #define PORT "65018"
-#endif
 
 static void finish_100(struct io_conn *conn, int *state)
 {
@@ -29,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);
@@ -109,7 +107,7 @@ int main(void)
                exit(0);
        }
        freeaddrinfo(addrinfo);
-       ok1(io_loop() == &state + 1);
+       ok1(io_loop(NULL, NULL) == &state + 1);
        ok1(state == 4);
        io_close_listener(l);
        ok1(wait(&state));