From 32a87ac6d1cd0e24fe084d31df70d06b5ac593f4 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 28 Apr 2017 12:12:31 +0100 Subject: [PATCH] [Minor] Fix warnings --- rules/forwarding.lua | 2 -- src/libmime/mime_expressions.c | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rules/forwarding.lua b/rules/forwarding.lua index d145890d2..5adb562ef 100644 --- a/rules/forwarding.lua +++ b/rules/forwarding.lua @@ -16,8 +16,6 @@ limitations under the License. -- Rules to detect forwarding -local fun = require "fun" - rspamd_config.FWD_GOOGLE = { callback = function (task) if not (task:has_from(1) and task:has_recipients(1)) then diff --git a/src/libmime/mime_expressions.c b/src/libmime/mime_expressions.c index 0c036a89c..64344f4b5 100644 --- a/src/libmime/mime_expressions.c +++ b/src/libmime/mime_expressions.c @@ -1008,11 +1008,13 @@ rspamd_header_exists (struct rspamd_task * task, GArray * args, void *unused) return FALSE; } - debug_task ("try to get header %s", (gchar *)arg->data); headerlist = rspamd_message_get_header_array (task, (gchar *)arg->data, FALSE); + debug_task ("try to get header %s: %d", (gchar *)arg->data, + (headerlist != NULL)); + if (headerlist) { return TRUE; } -- 2.39.5