diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-09-25 17:33:16 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-09-25 17:33:16 +0400 |
commit | a9ab6be27de01f12ce6f201a4efa3eda8be0e36b (patch) | |
tree | 3c2cc297cc7c904d20a36dc783668632ed8088c2 /src/classifiers | |
parent | 3dd95c9525babd0ba5be237663132a69ebf71a2a (diff) | |
download | rspamd-a9ab6be27de01f12ce6f201a4efa3eda8be0e36b.tar.gz rspamd-a9ab6be27de01f12ce6f201a4efa3eda8be0e36b.zip |
* Fix learning
Diffstat (limited to 'src/classifiers')
-rw-r--r-- | src/classifiers/winnow.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/classifiers/winnow.c b/src/classifiers/winnow.c index 94b342525..6abd973ed 100644 --- a/src/classifiers/winnow.c +++ b/src/classifiers/winnow.c @@ -149,7 +149,11 @@ winnow_classify (struct classifier_ctx *ctx, statfile_pool_t *pool, GTree *input void winnow_learn (struct classifier_ctx *ctx, statfile_pool_t *pool, char *symbol, GTree *input, int in_class) { - struct winnow_callback_data data; + struct winnow_callback_data data = { + .file = NULL, + .sum = 0, + .count = 0, + }; GList *cur; struct statfile *st; @@ -157,8 +161,6 @@ winnow_learn (struct classifier_ctx *ctx, statfile_pool_t *pool, char *symbol, G g_assert (ctx != NULL); data.pool = pool; - data.sum = 0; - data.count = 0; data.in_class = in_class; data.now = time (NULL); data.ctx = ctx; |