diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-04-08 09:11:16 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-04-08 09:11:16 +0100 |
commit | e409d221019f1127537d449273b7bf4c72085c55 (patch) | |
tree | 650cf51d7c62d53b5e2b5f768da7918501bac0d9 /src/plugins | |
parent | 8ee3c686bae135d6b20de1ed484600c1a637048c (diff) | |
download | rspamd-e409d221019f1127537d449273b7bf4c72085c55.tar.gz rspamd-e409d221019f1127537d449273b7bf4c72085c55.zip |
[Minor] Remove minor warnings
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/fuzzy_check.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 317bb7dd4..bc8f326a7 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -1130,7 +1130,7 @@ fuzzy_cmd_stat (struct fuzzy_rule *rule, rspamd_mempool_t *pool) { struct rspamd_fuzzy_cmd *cmd; - struct rspamd_fuzzy_encrypted_cmd *enccmd; + struct rspamd_fuzzy_encrypted_cmd *enccmd = NULL; struct fuzzy_cmd_io *io; if (rule->peer_key) { @@ -1151,7 +1151,7 @@ fuzzy_cmd_stat (struct fuzzy_rule *rule, io->tag = cmd->tag; memcpy (&io->cmd, cmd, sizeof (io->cmd)); - if (rule->peer_key) { + if (rule->peer_key && enccmd) { fuzzy_encrypt_cmd (rule, &enccmd->hdr, (guchar *)cmd, sizeof (*cmd)); io->io.iov_base = enccmd; io->io.iov_len = sizeof (*enccmd); @@ -1173,7 +1173,7 @@ fuzzy_cmd_hash (struct fuzzy_rule *rule, rspamd_mempool_t *pool) { struct rspamd_fuzzy_cmd *cmd; - struct rspamd_fuzzy_encrypted_cmd *enccmd; + struct rspamd_fuzzy_encrypted_cmd *enccmd = NULL; struct fuzzy_cmd_io *io; if (rule->peer_key) { @@ -1208,7 +1208,7 @@ fuzzy_cmd_hash (struct fuzzy_rule *rule, memcpy (&io->cmd, cmd, sizeof (io->cmd)); - if (rule->peer_key) { + if (rule->peer_key && enccmd) { fuzzy_encrypt_cmd (rule, &enccmd->hdr, (guchar *)cmd, sizeof (*cmd)); io->io.iov_base = enccmd; io->io.iov_len = sizeof (*enccmd); |