From dbee2f63ee747b5d4247038f27566bc5aebfe3b7 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 11 Oct 2010 18:39:56 +0400 Subject: Fixes bugs found with clang-static analyser. Strictly follow c99 standart. Turn on pedantic c99 checks. --- src/fuzzy_storage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/fuzzy_storage.c') 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)); -- cgit v1.2.3