diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/filter.c | 6 | ||||
-rw-r--r-- | src/logger.c | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/filter.c b/src/filter.c index 83868e9b9..f1851d295 100644 --- a/src/filter.c +++ b/src/filter.c @@ -315,7 +315,6 @@ composites_foreach_callback (gpointer key, gpointer value, void *data) GQueue *stack; GList *symbols = NULL, *s; gsize cur, op1, op2; - struct symbol *res; stack = g_queue_new (); @@ -369,10 +368,7 @@ composites_foreach_callback (gpointer key, gpointer value, void *data) s = g_list_next (s); } /* Add new symbol */ - res = memory_pool_alloc (cd->task->task_pool, sizeof (struct symbol)); - res->score = 1.; - res->options = NULL; - g_hash_table_insert (cd->metric_res->symbols, key, res); + insert_result (cd->task, key, 1.0, NULL); } } diff --git a/src/logger.c b/src/logger.c index 4b04a93f1..c7626a03c 100644 --- a/src/logger.c +++ b/src/logger.c @@ -176,7 +176,7 @@ close_log (void) case RSPAMD_LOG_FILE: if (rspamd_log->enabled) { if (rspamd_log->repeats > REPEATS_MIN) { - snprintf (tmpbuf, sizeof (tmpbuf), "Last message repeated %ud times", rspamd_log->repeats); + rspamd_snprintf (tmpbuf, sizeof (tmpbuf), "Last message repeated %ud times", rspamd_log->repeats); rspamd_log->repeats = 0; if (rspamd_log->saved_message) { file_log_function (NULL, rspamd_log->saved_function, rspamd_log->cfg->log_level, rspamd_log->saved_message, TRUE, NULL); |