diff options
author | gramanas <anastasis.gramm2@gmail.com> | 2018-12-06 09:23:52 +0200 |
---|---|---|
committer | gramanas <anastasis.gramm2@gmail.com> | 2018-12-06 09:23:52 +0200 |
commit | eabd52462bfdb409121b351f198d535649d2b3b9 (patch) | |
tree | 434ec71438df3c822d34fc0b8d83fa977264c546 /src/list.c | |
parent | bd85acf6a408674bcdcb5116963fe4fea2247280 (diff) | |
download | ck-eabd52462bfdb409121b351f198d535649d2b3b9.tar.gz ck-eabd52462bfdb409121b351f198d535649d2b3b9.tar.bz2 ck-eabd52462bfdb409121b351f198d535649d2b3b9.zip |
Add log to file, fix list ckconf bug
Diffstat (limited to 'src/list.c')
-rw-r--r-- | src/list.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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); |