]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Properly show warning
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 11 Apr 2017 15:40:17 +0000 (16:40 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 11 Apr 2017 15:40:17 +0000 (16:40 +0100)
src/libstat/classifiers/bayes.c

index cf1f35e6ee260d067c700471f43bec15b0db0892..2aa15eee9211d0558e16997c351536d17f0bebff 100644 (file)
@@ -337,12 +337,12 @@ bayes_classify (struct rspamd_classifier * ctx,
        rspamd_mempool_set_variable (task->task_pool, "bayes_prob", pprob, NULL);
 
        if (ctx->cfg->min_tokens > 0 &&
-                       cl.text_tokens < ctx->cfg->min_tokens * 0.1) {
+                       cl.text_tokens < (gint)(ctx->cfg->min_tokens * 0.1)) {
                msg_info_bayes ("ignore bayes probability %.2f since we have "
-                               "too few text tokens: %uL, at least %.0f is required",
+                               "too few text tokens: %uL, at least %d is required",
                                final_prob,
                                cl.text_tokens,
-                               ctx->cfg->min_tokens * 0.1);
+                               (gint)(ctx->cfg->min_tokens * 0.1));
 
                return TRUE;
        }