diff options
| author | jvoisin | 2017-10-24 00:16:30 +0200 |
|---|---|---|
| committer | jvoisin | 2017-10-24 00:16:30 +0200 |
| commit | 92a4b93c4d420fefe590bd88521ec76d8bebd3fe (patch) | |
| tree | c817f0cff179136fb4321822198481d05dde2c6c /src/sp_config_keywords.c | |
| parent | ca51803abbe0b5605f936f5676d9c1a528713033 (diff) | |
Remove the `enable` member from the disable function structure
Also add some more tests
Diffstat (limited to 'src/sp_config_keywords.c')
| -rw-r--r-- | src/sp_config_keywords.c | 10 |
1 files changed, 4 insertions, 6 deletions
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) { | |||
| 182 | return ret; | 182 | return ret; |
| 183 | } | 183 | } |
| 184 | 184 | ||
| 185 | if (true == disable){ | ||
| 186 | df->enable = false; | ||
| 187 | } else { | ||
| 188 | df->enable = true; | ||
| 189 | } | ||
| 190 | |||
| 191 | if (df->value && df->value_r) { | 185 | if (df->value && df->value_r) { |
| 192 | sp_log_err("config", | 186 | sp_log_err("config", |
| 193 | "Invalid configuration line: 'sp.disabled_functions%s':" | 187 | "Invalid configuration line: 'sp.disabled_functions%s':" |
| @@ -296,6 +290,10 @@ int parse_disabled_functions(char *line) { | |||
| 296 | break; | 290 | break; |
| 297 | } | 291 | } |
| 298 | 292 | ||
| 293 | if (true == disable) { | ||
| 294 | return ret; | ||
| 295 | } | ||
| 296 | |||
| 299 | if (df->ret || df->r_ret || df->ret_type) { | 297 | if (df->ret || df->r_ret || df->ret_type) { |
| 300 | sp_list_insert( | 298 | sp_list_insert( |
| 301 | SNUFFLEUPAGUS_G(config).config_disabled_functions_ret->disabled_functions, | 299 | SNUFFLEUPAGUS_G(config).config_disabled_functions_ret->disabled_functions, |
