X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fdummy_device.c;h=15f0654f49be31ca59cdaeab87c8b7f5548ee8ff;hb=1c475ecb575367a6b3f9328b0f643ad636155341;hp=c43d586258503efdf6fd0a632fb7423a45f45848;hpb=41583d5dcfc1277b1a203478de4cce2cd0cda1b1;p=tinc diff --git a/src/dummy_device.c b/src/dummy_device.c index c43d5862..15f0654f 100644 --- a/src/dummy_device.c +++ b/src/dummy_device.c @@ -22,12 +22,13 @@ #include "device.h" #include "logger.h" #include "net.h" +#include "xalloc.h" -static char *device_info = "dummy device"; +static const char *device_info = "dummy device"; static bool setup_device(void) { - device = "dummy"; - iface = "dummy"; + device = xstrdup("dummy"); + iface = xstrdup("dummy"); logger(DEBUG_ALWAYS, LOG_INFO, "%s (%s) is a %s", device, iface, device_info); return true; } @@ -36,10 +37,12 @@ static void close_device(void) { } static bool read_packet(vpn_packet_t *packet) { + (void)packet; return false; } static bool write_packet(vpn_packet_t *packet) { + (void)packet; return true; }