[pisa-src] r1644 - trunk/pisasd/sdmain.c

  • From: Thomas Jansen <mithi@xxxxxxxxx>
  • To: pisa-src@xxxxxxxxxxxxx
  • Date: Wed, 11 Nov 2009 14:21:05 +0100

Author: tjansen
Date: Wed Nov 11 14:21:05 2009
New Revision: 1644

Log:
Replaced constant IFNAMSIZ with the actual sizeof.

If the variable size should ever change, we don't have to remember to change
it here as well. Analog commit in client: 1639.

Modified:
   trunk/pisasd/sdmain.c

Modified: trunk/pisasd/sdmain.c
==============================================================================
--- trunk/pisasd/sdmain.c       Wed Nov 11 14:18:16 2009        (r1643)
+++ trunk/pisasd/sdmain.c       Wed Nov 11 14:21:05 2009        (r1644)
@@ -379,7 +379,7 @@
 
        /* create the tunnel device and assign an IP address */
        inet_pton(AF_INET, "255.255.255.0", &netmask);
-       sd_ctx.fd_tunnel = pisa_tunnel_open_tundev(sd_ctx.tunnel_device_name, 
IFNAMSIZ);
+       sd_ctx.fd_tunnel = pisa_tunnel_open_tundev(sd_ctx.tunnel_device_name, 
sizeof(sd_ctx.tunnel_device_name));
        pisa_tunnel_configure_main(sd_ctx.tunnel_device_name, &sd_cfg.ipaddr, 
&netmask, MTU_TUN);
 
        /* Initialize the scheduler */

Other related posts:

  • » [pisa-src] r1644 - trunk/pisasd/sdmain.c - Thomas Jansen