From 6b6ea70ba948c823db58c0088575ce1c6f4eb8be Mon Sep 17 00:00:00 2001 From: Jakob Olsson <jakob.olsson@iopsys.eu> Date: Fri, 25 Feb 2022 09:35:08 +0100 Subject: [PATCH] config: fix warns --- src/config.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.c b/src/config.c index aaa8cd9ab..19087d12b 100644 --- a/src/config.c +++ b/src/config.c @@ -213,11 +213,11 @@ char *agent_get_controller_enabled(struct agent *a, char *buf) { struct uci_context *ctx; struct uci_ptr ptr = {0}; - int ret = -1; + int ret; ctx = uci_alloc_context(); if (!ctx) - return -1; + return NULL; ptr.package = "mapcontroller"; ptr.section = "controller"; @@ -237,7 +237,7 @@ char *agent_get_controller_enabled(struct agent *a, char *buf) uci_unload(ctx, ptr.p); error: uci_free_context(ctx); - return ret; + return buf; } -- GitLab