chiark / gitweb /
Work around Bison's crazy redeclaration of malloc/free.
[secnet.git] / tun.c
diff --git a/tun.c b/tun.c
index 80606232d76de4eddff92b15e1c4c7b05f3cdfbf..5f9aa98d1051c5ae4d43ba32e6aa1768fa356447 100644 (file)
--- a/tun.c
+++ b/tun.c
@@ -95,8 +95,7 @@ static cstring_t tun_flavour_str(uint32_t flavour)
 }
 
 static int tun_beforepoll(void *sst, struct pollfd *fds, int *nfds_io,
-                         int *timeout_io, const struct timeval *tv_now,
-                         uint64_t *now)
+                         int *timeout_io)
 {
     struct tun *st=sst;
     *nfds_io=1;
@@ -105,8 +104,7 @@ static int tun_beforepoll(void *sst, struct pollfd *fds, int *nfds_io,
     return 0;
 }
 
-static void tun_afterpoll(void *sst, struct pollfd *fds, int nfds,
-                         const struct timeval *tv_now, uint64_t *now)
+static void tun_afterpoll(void *sst, struct pollfd *fds, int nfds)
 {
     struct tun *st=sst;
     int l;
@@ -334,7 +332,7 @@ static void tun_phase_hook(void *sst, uint32_t newphase)
 
     hostaddr=ipaddr_to_string(st->local_address);
     secnetaddr=ipaddr_to_string(st->nl.secnet_address);
-    snprintf(mtu,6,"%d",st->nl.mtu);
+    snprintf(mtu,sizeof(mtu),"%d",st->nl.mtu);
     mtu[5]=0;
 
     switch (st->ifconfig_type) {