aboutsummaryrefslogtreecommitdiffstats
path: root/src/list.c
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2018-12-06 09:23:52 +0200
committergramanas <anastasis.gramm2@gmail.com>2018-12-06 09:23:52 +0200
commiteabd52462bfdb409121b351f198d535649d2b3b9 (patch)
tree434ec71438df3c822d34fc0b8d83fa977264c546 /src/list.c
parentbd85acf6a408674bcdcb5116963fe4fea2247280 (diff)
downloadck-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.c12
1 files changed, 7 insertions, 5 deletions
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);