aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-09-30 11:32:54 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-09-30 11:32:54 +0100
commitb0bc4a9e9c89e4976e7a14f18d0595ec2b6e8213 (patch)
tree51b139d12ff2fcc59c00d32a5fcd46952a4b841b /src/libmime
parent9f8bcbd508f081c79d75bc32b81cfb8ac09c4b1c (diff)
downloadrspamd-b0bc4a9e9c89e4976e7a14f18d0595ec2b6e8213.tar.gz
rspamd-b0bc4a9e9c89e4976e7a14f18d0595ec2b6e8213.zip
[Rework] Use floating point arithmetics in Rspamd expressions
Diffstat (limited to 'src/libmime')
-rw-r--r--src/libmime/mime_expressions.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libmime/mime_expressions.c b/src/libmime/mime_expressions.c
index 7e6816170..329f80f95 100644
--- a/src/libmime/mime_expressions.c
+++ b/src/libmime/mime_expressions.c
@@ -83,7 +83,7 @@ static gboolean rspamd_is_empty_body (struct rspamd_task *task,
static rspamd_expression_atom_t * rspamd_mime_expr_parse (const gchar *line, gsize len,
rspamd_mempool_t *pool, gpointer ud, GError **err);
-static gint rspamd_mime_expr_process (gpointer input, rspamd_expression_atom_t *atom);
+static gdouble rspamd_mime_expr_process (gpointer input, rspamd_expression_atom_t *atom);
static gint rspamd_mime_expr_priority (rspamd_expression_atom_t *atom);
static void rspamd_mime_expr_destroy (rspamd_expression_atom_t *atom);
@@ -912,13 +912,13 @@ rspamd_mime_expr_process_function (struct rspamd_function_atom * func,
return selected->func (task, func->args, selected->user_data);
}
-static gint
+static gdouble
rspamd_mime_expr_process (gpointer input, rspamd_expression_atom_t *atom)
{
struct rspamd_task *task = input;
struct rspamd_mime_atom *mime_atom;
lua_State *L;
- gint ret = 0;
+ gdouble ret = 0;
g_assert (task != NULL);
g_assert (atom != NULL);