diff options
author | Anastasis Grammenos <anastasis.gramm2@gmail.com> | 2018-10-16 23:15:07 +0300 |
---|---|---|
committer | Anastasis Grammenos <anastasis.gramm2@gmail.com> | 2018-10-16 23:15:07 +0300 |
commit | 7ba148fcc4ca4a504a0fb3f4091f64b1be530ee0 (patch) | |
tree | 1ed976865a25b2b2ce46a5b05fc5652b03af8abb /src | |
parent | 5b8b4fdbfc6f88e874bc62269b9188caf886120f (diff) | |
download | ck-7ba148fcc4ca4a504a0fb3f4091f64b1be530ee0.tar.gz ck-7ba148fcc4ca4a504a0fb3f4091f64b1be530ee0.tar.bz2 ck-7ba148fcc4ca4a504a0fb3f4091f64b1be530ee0.zip |
macro in free_conf
Diffstat (limited to 'src')
-rw-r--r-- | src/confparser.c | 10 |
1 files changed, 5 insertions, 5 deletions
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) { |