[Olsr-dev] [PATCH v1 16/23] lq_plugin: clean up invocation of olsr_exit
Ferry Huberts
(spam-protected)
Fri Nov 6 16:29:08 CET 2015
From: Ferry Huberts <(spam-protected)>
olsr_exit already prints the message
Signed-off-by: Ferry Huberts <(spam-protected)>
---
src/lq_plugin.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/lq_plugin.c b/src/lq_plugin.c
index 7057faf..6d0f4d6 100644
--- a/src/lq_plugin.c
+++ b/src/lq_plugin.c
@@ -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);
--
2.5.0
More information about the Olsr-dev
mailing list