lq_plugin: clean up invocation of olsr_exit
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 5 Nov 2015 22:53:45 +0000 (23:53 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Fri, 6 Nov 2015 15:26:23 +0000 (16:26 +0100)
olsr_exit already prints the message

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/lq_plugin.c

index 7057faf..6d0f4d6 100644 (file)
@@ -85,8 +85,9 @@ activate_lq_handler(const char *name)
 
   node = (struct lq_handler_node *)avl_find(&lq_handler_tree, name);
   if (node == NULL) {
-    OLSR_PRINTF(1, "Error, unknown lq_handler '%s'\n", name);
-    olsr_exit("", 1);
+    char buf[1024];
+    snprintf(buf, sizeof(buf), "Error, unknown lq_handler '%s'", name);
+    olsr_exit(buf, 1);
   }
 
   OLSR_PRINTF(1, "Using '%s' algorithm for lq calculation.\n", name);