From b74e1ee5ae045eb5b61592d374f6cdf3011818be Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 5 Dec 2013 00:02:28 +0000 Subject: [PATCH] Fix initialization order. --- src/plugins/fuzzy_check.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 304de560a..1a1657878 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; } -- 2.39.5