Const correctness.
[oweals/tinc.git] / src / dummy_device.c
index deda7d4..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;
 }