From: Vsevolod Stakhov Date: Fri, 15 Dec 2023 14:50:13 +0000 (+0000) Subject: [Minor] Remove stupid threshold for saving symbol value X-Git-Tag: 3.8.0~27 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0277935f574a683a7d25ccfd306a8c67db1d74c3;p=rspamd.git [Minor] Remove stupid threshold for saving symbol value --- diff --git a/src/controller.c b/src/controller.c index 339cf1184..f05105e91 100644 --- a/src/controller.c +++ b/src/controller.c @@ -2414,7 +2414,7 @@ rspamd_controller_handle_savesymbols( val = ucl_object_todouble(jvalue); sym = g_hash_table_lookup(session->cfg->symbols, ucl_object_tostring(jname)); - if (sym && fabs(*sym->weight_ptr - val) > 0.01) { + if (sym && fabs(*sym->weight_ptr - val) > DBL_EPSILON) { if (!add_dynamic_symbol(ctx->cfg, DEFAULT_METRIC, ucl_object_tostring(jname), val)) { msg_err_session("add symbol failed for %s",