From eabd52462bfdb409121b351f198d535649d2b3b9 Mon Sep 17 00:00:00 2001 From: gramanas Date: Thu, 6 Dec 2018 09:23:52 +0200 Subject: Add log to file, fix list ckconf bug --- src/list.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/list.c') diff --git a/src/list.c b/src/list.c index 0976ac1..144dd41 100644 --- a/src/list.c +++ b/src/list.c @@ -245,11 +245,13 @@ int run_LIST(UserOpt *opt, Conf *conf) { strcat(tmp, opt->confDir); list_add(the_list, tmp); #define X(var, str, name, optional) \ - strcpy(tmp, ""); \ - strcat(tmp, name); \ - strcat(tmp, ": "); \ - strcat(tmp, conf->var); \ - list_add(the_list, tmp); + if (conf->var) { \ + strcpy(tmp, ""); \ + strcat(tmp, name); \ + strcat(tmp, ": "); \ + strcat(tmp, conf->var); \ + list_add(the_list, tmp); \ + } CONFIG_VARIABLES_TABLE; #undef X list_print(the_list); -- cgit v1.2.3