From 56beefcbe41276328a062f1eee7d0c31cd98e5b9 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 23 May 2013 17:35:33 +0100 Subject: [PATCH] Fix call to get statfile's revision. --- src/classifiers/bayes.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/classifiers/bayes.c b/src/classifiers/bayes.c index 0b4e03ec41..2a8ae44c72 100644 --- a/src/classifiers/bayes.c +++ b/src/classifiers/bayes.c @@ -202,7 +202,7 @@ bayes_classify (struct classifier_ctx* ctx, statfile_pool_t *pool, GTree *input, gchar *value; gint nodes, i = 0, selected_st = -1, cnt; gint minnodes; - guint64 maxhits = 0; + guint64 maxhits = 0, rev; double final_prob, h, s; struct statfile *st; stat_file_t *file; @@ -263,11 +263,12 @@ bayes_classify (struct classifier_ctx* ctx, statfile_pool_t *pool, GTree *input, } data.statfiles[i].file = file; data.statfiles[i].st = st; + statfile_get_revision (file, &rev, NULL); if (st->is_spam) { - data.total_spam += statfile_get_revision (file); + data.total_spam += rev; } else { - data.total_ham += statfile_get_revision (file); + data.total_ham += rev; } cur = g_list_next (cur); -- 2.47.3