From a64e099efcc835e93ea9dafff9bb01829d632fa6 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 13 Jun 2014 02:16:47 +0200 Subject: options: remove some unneeded stuff No options pointing to global variables are in use anymore, so that part can be removed. --- options/m_config.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'options/m_config.c') diff --git a/options/m_config.c b/options/m_config.c index ebb24ad098..585f1f5d81 100644 --- a/options/m_config.c +++ b/options/m_config.c @@ -323,8 +323,6 @@ static void add_negation_option(struct m_config *config, .name = opt->name, .type = CONF_TYPE_STORE, .flags = opt->flags & (M_OPT_NOCFG | M_OPT_GLOBAL | M_OPT_PRE_PARSE), - .is_new_option = opt->is_new_option, - .p = opt->p, .offset = opt->offset, .max = value, }; @@ -371,14 +369,11 @@ static void m_config_add_option(struct m_config *config, .name = arg->name, }; - if (arg->is_new_option) { + if (arg->offset >= 0) { if (optstruct) co.data = (char *)optstruct + arg->offset; if (optstruct_def) co.default_data = (char *)optstruct_def + arg->offset; - } else { - co.data = arg->p; - co.default_data = arg->p; } if (arg->defval) @@ -412,7 +407,7 @@ static void m_config_add_option(struct m_config *config, add_options(config, co.name, new_optstruct, new_optstruct_def, subopts->opts); } else { - const struct m_option *sub = arg->p; + const struct m_option *sub = arg->priv; add_options(config, co.name, optstruct, optstruct_def, sub); } } else { -- cgit v1.2.3