From: Vsevolod Stakhov Date: Wed, 23 Mar 2022 20:23:04 +0000 (+0000) Subject: [Minor] Micro-optimisation X-Git-Tag: 3.2~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9d792e5d1dc9375284d963d3e43400d303f41393;p=rspamd.git [Minor] Micro-optimisation Suggested by: @citrin --- diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua index fa543e73d..f1c20fa13 100644 --- a/src/plugins/lua/rbl.lua +++ b/src/plugins/lua/rbl.lua @@ -662,8 +662,8 @@ local function gen_rbl_callback(rule) email_tbl.domain = email_tbl.domain:lower() email_tbl.user = email_tbl.user:lower() - if #email_tbl.domain == 0 or #email_tbl.user == 0 then - rspamd_logger.infox(task, "got empty/invalid email: '%s@%s'; skip it in the checks", + if email_tbl.domain == '' or email_tbl.user == '' then + rspamd_logger.infox(task, "got an email with some empty parts: '%s@%s'; skip it in the checks", email_tbl.user, email_tbl.domain) return end