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 2c4ca3b..4a1ccf5 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 eb1c7fd..a9f8491 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 2c87299..219b993 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 10456e3..7b1fa1d 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 19dc5e6..f283d56 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@ --- *