diff options
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); |