From 92a4b93c4d420fefe590bd88521ec76d8bebd3fe Mon Sep 17 00:00:00 2001 From: jvoisin Date: Tue, 24 Oct 2017 00:16:30 +0200 Subject: Remove the `enable` member from the disable function structure Also add some more tests --- src/sp_config_keywords.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/sp_config_keywords.c') diff --git a/src/sp_config_keywords.c b/src/sp_config_keywords.c index 168ee1c..604c2a1 100644 --- a/src/sp_config_keywords.c +++ b/src/sp_config_keywords.c @@ -182,12 +182,6 @@ int parse_disabled_functions(char *line) { return ret; } - if (true == disable){ - df->enable = false; - } else { - df->enable = true; - } - if (df->value && df->value_r) { sp_log_err("config", "Invalid configuration line: 'sp.disabled_functions%s':" @@ -296,6 +290,10 @@ int parse_disabled_functions(char *line) { break; } + if (true == disable) { + return ret; + } + if (df->ret || df->r_ret || df->ret_type) { sp_list_insert( SNUFFLEUPAGUS_G(config).config_disabled_functions_ret->disabled_functions, -- cgit v1.3