From: Mark Wooding Date: Sat, 22 Jun 2013 16:09:05 +0000 (+0100) Subject: Use the new mLib macros for discarding uninteresting error codes. X-Git-Tag: 1.0.0pre14~6 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/tripe/commitdiff_plain/997353570c896a609b47088606720347ca89b767 Use the new mLib macros for discarding uninteresting error codes. --- diff --git a/pkstream/pkstream.c b/pkstream/pkstream.c index 2c4ca3ba..4a1ccf50 100644 --- a/pkstream/pkstream.c +++ b/pkstream/pkstream.c @@ -129,7 +129,7 @@ static void rdtcp(octet *b, size_t sz, pkbuf *pk, size_t *k, void *vp) } pksz = LOAD16(b); if (pksz + 2 == sz) { - IGNORE(write(fd_udp, b + 2, pksz)); + DISCARD(write(fd_udp, b + 2, pksz)); selpk_want(&p->p, 2); } else { selpk_want(&p->p, pksz + 2); diff --git a/proxy/tripe-mitm.c b/proxy/tripe-mitm.c index eb1c7fd2..a9f84914 100644 --- a/proxy/tripe-mitm.c +++ b/proxy/tripe-mitm.c @@ -439,7 +439,7 @@ static void adddelay(filter *f, unsigned ac, char **av) static void dosend(filter *f, const octet *buf, size_t sz) { printf("send to `%s'\n", f->p_to->name); - IGNORE(write(f->p_to->sf.fd, buf, sz)); + DISCARD(write(f->p_to->sf.fd, buf, sz)); } static void addsend(filter *f, unsigned ac, char **av) diff --git a/server/tun-bsd.c b/server/tun-bsd.c index 2c872997..219b9934 100644 --- a/server/tun-bsd.c +++ b/server/tun-bsd.c @@ -123,7 +123,7 @@ static void t_inject(tunnel *t, buf *b) trace(T_TUNNEL, "tun-bsd: inject decrypted packet"); trace_block(T_PACKET, "tun-bsd: packet contents", BBASE(b), BLEN(b)); }) - IGNORE(write(t->f.fd, BBASE(b), BLEN(b))); + DISCARD(write(t->f.fd, BBASE(b), BLEN(b))); } /* --- @t_destroy@ --- * diff --git a/server/tun-linux.c b/server/tun-linux.c index 10456e35..7b1fa1df 100644 --- a/server/tun-linux.c +++ b/server/tun-linux.c @@ -129,7 +129,7 @@ static void t_inject(tunnel *t, buf *b) trace(T_TUNNEL, "tun-linux: inject decrypted packet"); trace_block(T_PACKET, "tunnel: packet contents", BBASE(b), BLEN(b)); }) - IGNORE(write(t->f.fd, BBASE(b), BLEN(b))); + DISCARD(write(t->f.fd, BBASE(b), BLEN(b))); } /* --- @t_destroy@ --- * diff --git a/server/tun-unet.c b/server/tun-unet.c index 19dc5e60..f283d568 100644 --- a/server/tun-unet.c +++ b/server/tun-unet.c @@ -129,7 +129,7 @@ static void t_inject(tunnel *t, buf *b) trace(T_TUNNEL, "tun-unet: inject decrypted packet"); trace_block(T_PACKET, "tun-unet: packet contents", BBASE(b), BLEN(b)); }) - IGNORE(write(t->f.fd, BBASE(b), BLEN(b))); + DISCARD(write(t->f.fd, BBASE(b), BLEN(b))); } /* --- @t_destroy@ --- *