aboutsummaryrefslogtreecommitdiffstats
path: root/src/fuzzy_storage.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-10-11 18:39:56 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-10-11 18:39:56 +0400
commitdbee2f63ee747b5d4247038f27566bc5aebfe3b7 (patch)
treec2d60701691ab106e593be24a6974ab7dc0e6fa1 /src/fuzzy_storage.c
parentb0ce5fefb9e694083846af1e45b09f4baa4b0446 (diff)
downloadrspamd-dbee2f63ee747b5d4247038f27566bc5aebfe3b7.tar.gz
rspamd-dbee2f63ee747b5d4247038f27566bc5aebfe3b7.zip
Fixes bugs found with clang-static analyser.
Strictly follow c99 standart. Turn on pedantic c99 checks.
Diffstat (limited to 'src/fuzzy_storage.c')
-rw-r--r--src/fuzzy_storage.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c
index d967fcfe2..1bbe0dd3c 100644
--- a/src/fuzzy_storage.c
+++ b/src/fuzzy_storage.c
@@ -646,7 +646,8 @@ process_fuzzy_command (struct fuzzy_session *session)
switch (session->cmd.cmd) {
case FUZZY_CHECK:
- if ((r = process_check_command (&session->cmd, &flag))) {
+ r = process_check_command (&session->cmd, &flag);
+ if (r != 0) {
r = rspamd_snprintf (buf, sizeof (buf), "OK %d %d" CRLF, r, flag);
if (sendto (session->fd, buf, r, 0, (struct sockaddr *)&session->sa, session->salen) == -1) {
msg_err ("error while writing reply: %s", strerror (errno));