diff options
-rw-r--r-- | src/classifiers/winnow.c | 6 | ||||
-rw-r--r-- | src/statfile.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/classifiers/winnow.c b/src/classifiers/winnow.c index 1d48cc2ba..78e05d43b 100644 --- a/src/classifiers/winnow.c +++ b/src/classifiers/winnow.c @@ -232,9 +232,6 @@ winnow_classify (struct classifier_ctx *ctx, statfile_pool_t * pool, GTree * inp if (data.count != 0) { res = data.sum / data.count; - if (st->normalizer != NULL) { - res = st->normalizer (task->cfg, res, st->normalizer_data); - } } else { res = 0; @@ -253,6 +250,9 @@ winnow_classify (struct classifier_ctx *ctx, statfile_pool_t * pool, GTree * inp #ifdef WITH_LUA max = call_classifier_post_callbacks (ctx->cfg, task, max); #endif + if (st->normalizer != NULL) { + max = st->normalizer (task->cfg, max, st->normalizer_data); + } insert_result (task, ctx->cfg->metric, sel->symbol, max, cur); } } diff --git a/src/statfile.c b/src/statfile.c index 1e47b3ec7..005ea7c8a 100644 --- a/src/statfile.c +++ b/src/statfile.c @@ -365,7 +365,7 @@ statfile_pool_open (statfile_pool_t * pool, char *filename, size_t size, gboolea qsort (pool->files, pool->opened, sizeof (stat_file_t), cmpstatfile); memory_pool_unlock_mutex (pool->lock); - return new_file; + return statfile_pool_is_open (pool, filename); } int |