chiark / gitweb /
build: Use new separate auto-version tool.
[tripe] / server / tun-unet.c
index bdf23fe4454066dc0e08e96c41016f881521018f..2d11ca0f8e3480057b1e1167c58a59f6baaf81fe 100644 (file)
@@ -1,13 +1,11 @@
 /* -*-c-*-
- *
- * $Id$
  *
  * Tunnel interface based on Linux Usernet
  *
  * (c) 2001 Straylight/Edgeware
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of Trivial IP Encryption (TrIPE).
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * TrIPE is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with TrIPE; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -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 ("<error>");
+    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",