From: Vsevolod Stakhov Date: Fri, 28 Apr 2017 11:12:31 +0000 (+0100) Subject: [Minor] Fix warnings X-Git-Tag: 1.5.7~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=32a87ac6d1cd0e24fe084d31df70d06b5ac593f4;p=rspamd.git [Minor] Fix warnings --- 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; }