Rename distro/ to systemd/.
[tinc] / src / dummy_device.c
index 9dd3fae..4b01072 100644 (file)
 #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 uint64_t device_total_in = 0;
 static uint64_t device_total_out = 0;
 
 static bool setup_device(void) {
-       device = "dummy";
-       iface = "dummy";
+       device = xstrdup("dummy");
+       iface = xstrdup("dummy");
        logger(LOG_INFO, "%s (%s) is a %s", device, iface, device_info);
        return true;
 }
@@ -39,6 +40,7 @@ static void close_device(void) {
 }
 
 static bool read_packet(vpn_packet_t *packet) {
+       (void)packet;
        return false;
 }