From 7ba148fcc4ca4a504a0fb3f4091f64b1be530ee0 Mon Sep 17 00:00:00 2001 From: Anastasis Grammenos Date: Tue, 16 Oct 2018 23:15:07 +0300 Subject: macro in free_conf --- src/confparser.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/confparser.c b/src/confparser.c index 64bfe34..2a11467 100644 --- a/src/confparser.c +++ b/src/confparser.c @@ -135,12 +135,12 @@ int config_file_parse(Conf *conf, UserOpt *opt) { } void free_conf(Conf *conf) { - if (conf->vc_dir) { - free(conf->vc_dir); - } - if (conf->scrt_dir) { - free(conf->scrt_dir); +#define X(var,str,name) \ + if (conf->var) { \ + free(conf->var); \ } + CONFIG_VARIABLES_TABLE +#undef X } int init_create_config_file(UserOpt *opt) { -- cgit v1.2.3