From b2f292bf588cb66c93a0d288327366fd4644e988 Mon Sep 17 00:00:00 2001 From: nirenjan Date: Thu, 22 Sep 2022 21:31:49 -0700 Subject: [PATCH] Cleanup config dump routine --- daemon/x52d_config_dump.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/daemon/x52d_config_dump.c b/daemon/x52d_config_dump.c index f8ff8c8..ef68c83 100644 --- a/daemon/x52d_config_dump.c +++ b/daemon/x52d_config_dump.c @@ -140,16 +140,12 @@ exit_dump: const char *x52d_config_get_param(struct x52d_config *cfg, const char *section, const char *key) { - const char *value = NULL; - #define CFG(section_c, key_c, name, type, def) do { \ if (strcasecmp(section, #section_c) == 0 && strcasecmp(key, #key_c) == 0) { \ - value = type ## _dumper(section, key, cfg, offsetof(struct x52d_config, name)); \ - goto return_value; \ + return type ## _dumper(section, key, cfg, offsetof(struct x52d_config, name)); \ } \ } while (0); #include "x52d_config.def" -return_value: - return value; + return NULL; }