]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Avoid using of the cached result
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 14 Mar 2018 13:45:39 +0000 (13:45 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 14 Mar 2018 13:45:39 +0000 (13:45 +0000)
src/libstat/stat_process.c

index e096737839030d5376fadbcc1cc8ddd96a7e61b8..2284907a1e9517b598ff410b4c5ac4ccf33968b4 100644 (file)
@@ -1122,9 +1122,7 @@ rspamd_stat_check_autolearn (struct rspamd_task *task)
 
                                        if (mres) {
 
-                                               if (mres->action == METRIC_ACTION_MAX) {
-                                                       mres->action = rspamd_check_action_metric (task, mres);
-                                               }
+                                               mres->action = rspamd_check_action_metric (task, mres);
 
                                                if (mres->score > rspamd_task_get_required_score (task, mres)) {
                                                        task->flags |= RSPAMD_TASK_FLAG_LEARN_SPAM;