From: Alexander Moisseev Date: Sun, 13 Nov 2016 15:02:51 +0000 (+0300) Subject: [Minor] Further simplify conditionals X-Git-Tag: 1.4.0~76^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7fd12bdbdea3274b6e1a292ca35748a73efd01f8;p=rspamd.git [Minor] Further simplify conditionals --- diff --git a/src/plugins/lua/greylist.lua b/src/plugins/lua/greylist.lua index 35c30b806..70ad2117d 100644 --- a/src/plugins/lua/greylist.lua +++ b/src/plugins/lua/greylist.lua @@ -275,11 +275,9 @@ local function greylist_set(task) end local action = task:get_metric_action('default') - if action == 'reject' then return end - if do_greylisting_required and do_greylisting_required ~= "1" then + if action == 'reject' or + not do_greylisting_required and action == 'no action' then return - else - if action == 'no action' then return end end local body_key = data_key(task) local meta_key = envelope_key(task)