X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fio%2Ftest%2Frun-14-duplex-both-read.c;h=70bdec0ad39a502967cc6aaa50c9387c97bd0d4d;hp=366f1d44bbaafdf65c09baa1942a490df6c60053;hb=1273379185b86aefe5d426d3208289b70044acac;hpb=dded32f2b03fca526271e35671fa36d299880429;ds=sidebyside diff --git a/ccan/io/test/run-14-duplex-both-read.c b/ccan/io/test/run-14-duplex-both-read.c index 366f1d44..70bdec0a 100644 --- a/ccan/io/test/run-14-duplex-both-read.c +++ b/ccan/io/test/run-14-duplex-both-read.c @@ -12,8 +12,6 @@ #define PORT "65014" #endif -#define is_idle(conn) ((conn)->plan.io == NULL) - struct data { struct io_listener *l; int state; @@ -32,11 +30,11 @@ static struct io_plan end(struct io_conn *conn, struct data *d) d->state++; /* last one out closes. */ - if (conn == d->c1 && is_idle(d->c2)) + if (conn == d->c1 && io_is_idle(d->c2)) return io_close(); /* last one out closes. */ - if (conn == d->c2 && is_idle(d->c1)) + if (conn == d->c2 && io_is_idle(d->c1)) return io_close(); return io_idle();