t->results = g_array_sized_new (FALSE, TRUE,
sizeof (struct rspamd_token_result), cbdata->results_count);
+ g_array_set_size (t->results, cbdata->results_count);
cur = g_list_first (cbdata->classifier_runtimes);
continue;
}
- res = &g_array_index (t->results, struct rspamd_token_result, i);
-
curst = cl_runtime->st_runtime;
- res->cl_runtime = cl_runtime;
while (curst) {
- st_runtime = (struct rspamd_statfile_runtime *)curst->data;
+ st_runtime = (struct rspamd_statfile_runtime *)curst->data;
+ res = &g_array_index (t->results, struct rspamd_token_result, i);
+ res->cl_runtime = cl_runtime;
res->st_runtime = st_runtime;
if (st_runtime->backend->process_token (t, res,