chiark / gitweb /
Use the new mLib macros for discarding uninteresting error codes.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 22 Jun 2013 16:09:05 +0000 (17:09 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 12 Jul 2013 09:38:56 +0000 (10:38 +0100)
pkstream/pkstream.c
proxy/tripe-mitm.c
server/tun-bsd.c
server/tun-linux.c
server/tun-unet.c

index 2c4ca3ba4e5c054bb0cdb64585833a23dddbb6bd..4a1ccf5004150783d227f91732d5fb4c19798557 100644 (file)
@@ -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);
index eb1c7fd2c79785eff4ebe9f9f8acb726399a5707..a9f84914cf0a9a7e1690030ad4e0ec2906b2bf7c 100644 (file)
@@ -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)
index 2c872997f7a79e82ea70b522f24814060f86f1e8..219b9934733a5ef56075f5123c2b46ac79a7c816 100644 (file)
@@ -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@ --- *
index 10456e352c54c27050291b1ac898fa4c57c52b34..7b1fa1df5fe668ad802f1d6d3121ab18850e55ec 100644 (file)
@@ -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@ --- *
index 19dc5e6084f385e0a7397745ada6d5b04b502823..f283d568df160f7ecab71ee0c9b23ad9c81b05b7 100644 (file)
@@ -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@ --- *