From 6445760568e196c3239cdd08ec5432f96628f4cf Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Thu, 13 May 2021 14:48:39 +0100 Subject: [PATCH] lib.c (config_set_var_n): Return a pointer even if we don't change the var. Spotted by old GCC; not sure why newer versions are silent here. --- lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.c b/lib.c index 4f93285..edb6e33 100644 --- a/lib.c +++ b/lib.c @@ -1089,7 +1089,7 @@ struct config_var *config_set_var_n(struct config *conf, struct config_var *var = config_find_var_n(conf, sect, CF_CREAT, name, namelen); - if (var->f&~f&CF_OVERRIDE) return; + if (var->f&~f&CF_OVERRIDE) return (var); free(var->val); var->val = xstrndup(value, valuelen); var->n = valuelen; var->f = f; return (var); -- 2.11.0