X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fio%2Ftest%2Frun-17-homemade-io.c;h=b827713a789209f27bbac586ebfbe80aedfeed0c;hp=00fbf2233c59c9132c3f1c74a40e630429a64bf5;hb=c321a1d02755a77ae790d6e8976b2ff15edba89d;hpb=9e02685a6216720d37848a332187e3745b7f981e diff --git a/ccan/io/test/run-17-homemade-io.c b/ccan/io/test/run-17-homemade-io.c index 00fbf223..b827713a 100644 --- a/ccan/io/test/run-17-homemade-io.c +++ b/ccan/io/test/run-17-homemade-io.c @@ -41,7 +41,7 @@ static int do_read_packet(int fd, struct io_plan *plan) ok1(pkt->state == 2); pkt->state++; if (pkt->len == 0) - return 1; + return io_debug_io(1); if (!pkt->contents && !(pkt->contents = malloc(pkt->len))) goto fail; else { @@ -58,12 +58,12 @@ static int do_read_packet(int fd, struct io_plan *plan) plan->u.ptr_len.len += ret; /* Finished? */ - return (plan->u.ptr_len.len >= sizeof(pkt->len) - && plan->u.ptr_len.len == pkt->len + sizeof(pkt->len)); + return io_debug_io(plan->u.ptr_len.len >= sizeof(pkt->len) + && plan->u.ptr_len.len == pkt->len + sizeof(pkt->len)); fail: free(pkt->contents); - return -1; + return io_debug_io(-1); } static struct io_plan io_read_packet(struct packet *pkt,