From: Vsevolod Stakhov Date: Thu, 5 Dec 2013 00:02:28 +0000 (+0000) Subject: Fix initialization order. X-Git-Tag: 0.6.2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b74e1ee5ae045eb5b61592d374f6cdf3011818be;p=thirdparty%2Frspamd.git Fix initialization order. --- diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 304de560a0..1a16578789 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -342,6 +342,13 @@ fuzzy_parse_rule (struct config_file *cfg, ucl_object_t *obj) } } + if ((value = ucl_object_find_key (obj, "max_score")) != NULL) { + rule->max_score = ucl_obj_todouble (value); + } + if ((value = ucl_object_find_key (obj, "read_only")) != NULL) { + rule->read_only = ucl_obj_toboolean (value); + } + if ((value = ucl_object_find_key (obj, "servers")) != NULL) { if (value->type == UCL_ARRAY) { value = value->value.av; @@ -367,13 +374,6 @@ fuzzy_parse_rule (struct config_file *cfg, ucl_object_t *obj) } } - if ((value = ucl_object_find_key (obj, "max_score")) != NULL) { - rule->max_score = ucl_obj_todouble (value); - } - if ((value = ucl_object_find_key (obj, "read_only")) != NULL) { - rule->read_only = ucl_obj_toboolean (value); - } - return 0; }