X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/tripe/blobdiff_plain/e04c2d50fd96f3f31bc96851c55c6efecc10469c..5fb10b44d547dfcb3612b85e7115355301535ca0:/server/tun-unet.c diff --git a/server/tun-unet.c b/server/tun-unet.c index 3274db1c..2d11ca0f 100644 --- a/server/tun-unet.c +++ b/server/tun-unet.c @@ -1,6 +1,4 @@ /* -*-c-*- - * - * $Id$ * * Tunnel interface based on Linux Usernet * @@ -127,7 +125,7 @@ static tunnel *t_create(peer *p, char **ifn) if (ioctl(t->f.fd, UNIOCGINFO, &uni)) { a_warn("TUN", "-", "unet", "getinfo-error", "?ERRNO", A_END); - return (""); + return (0); } *ifn = xstrdup(uni.uni_ifname); T( trace(T_TUNNEL, "tun-unet: attached interface %s to peer `%s'", @@ -164,11 +162,7 @@ static void t_inject(tunnel *t, buf *b) */ static void t_destroy(tunnel *t) -{ - sel_rmfile(&t->f); - close(t->f.fd); - DESTROY(t); -} + { sel_rmfile(&t->f); close(t->f.fd); DESTROY(t); } const tunnel_ops tun_unet = { "unet",