From 4dda2b162fdab27197f371bb85842da581aee834 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 25 Sep 2012 11:45:31 +0000 Subject: -Wall cleanup --- src/linux/tun.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/linux/tun.c') diff --git a/src/linux/tun.c b/src/linux/tun.c index 85cdc01..43370f0 100644 --- a/src/linux/tun.c +++ b/src/linux/tun.c @@ -33,6 +33,7 @@ * along with uAnytun. If not, see . */ +#define _GNU_SOURCE #include #include "datatypes.h" @@ -116,6 +117,7 @@ int tun_init(tun_device_t* dev, const char* dev_name, const char* dev_type, cons int tun_init_post(tun_device_t* dev) { // nothing yet + return 0; } void tun_close(tun_device_t* dev) @@ -192,8 +194,8 @@ void tun_do_ifconfig(tun_device_t* dev) return; char* mtu_str = NULL; - asprintf(&mtu_str, "%d", dev->mtu_); - if(!mtu_str) { + int len = asprintf(&mtu_str, "%d", dev->mtu_); + if(len == -1) { log_printf(ERROR, "Execution of ifconfig failed"); return; } -- cgit v1.2.3