aboutsummaryrefslogtreecommitdiffstats
path: root/src/list.c
diff options
context:
space:
mode:
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);