diff options
author | cebka@lenovo-laptop <cebka@lenovo-laptop> | 2010-03-01 18:54:56 +0300 |
---|---|---|
committer | cebka@lenovo-laptop <cebka@lenovo-laptop> | 2010-03-01 18:54:56 +0300 |
commit | 7ea00c31332d289842f5b8e3f73ea64cda3968d9 (patch) | |
tree | 4e37c35678586412721601c36cfa786c458663b8 /src/classifiers/winnow.c | |
parent | 74cf00015278784d04d26b44bcf326f9493f7d62 (diff) | |
download | rspamd-7ea00c31332d289842f5b8e3f73ea64cda3968d9.tar.gz rspamd-7ea00c31332d289842f5b8e3f73ea64cda3968d9.zip |
* Fix bugs from previous commit
Diffstat (limited to 'src/classifiers/winnow.c')
-rw-r--r-- | src/classifiers/winnow.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/classifiers/winnow.c b/src/classifiers/winnow.c index af370bd38..4d728b8bc 100644 --- a/src/classifiers/winnow.c +++ b/src/classifiers/winnow.c @@ -235,16 +235,13 @@ winnow_weights (struct classifier_ctx *ctx, statfile_pool_t * pool, GTree * inpu w = memory_pool_alloc (task->task_pool, sizeof (struct classify_weight)); if (data.count != 0) { res = data.sum / data.count; - w->name = st->symbol; - w->weight = res; - resl = g_list_prepend (resl, w); } else { res = 0; - w->name = st->symbol; - w->weight = res; - resl = g_list_prepend (resl, w); } + w->name = st->symbol; + w->weight = res; + resl = g_list_prepend (resl, w); cur = g_list_next (cur); } |