commit 980ac60: [Minor] Remove redundant code

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Jun 12 10:35:09 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-06-12 11:29:30 +0100
URL: https://github.com/rspamd/rspamd/commit/980ac60a32e935db4535de46c3e65d5589cc918f (HEAD -> master)

[Minor] Remove redundant code

---
 src/lua/lua_config.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c
index a605f2fac..c880b235e 100644
--- a/src/lua/lua_config.c
+++ b/src/lua/lua_config.c
@@ -2050,16 +2050,9 @@ lua_config_register_symbol (lua_State * L)
 				nshots = 1;
 			}
 
-			if (!isnan (score)) {
-				rspamd_config_add_symbol (cfg, name,
-						score, description, group, flags,
-						0, nshots);
-			}
-			else {
-				rspamd_config_add_symbol (cfg, name,
-						NAN, description, group, flags,
-						0, nshots);
-			}
+			rspamd_config_add_symbol (cfg, name,
+					score, description, group, flags,
+					0, nshots);
 
 			lua_pushstring (L, "groups");
 			lua_gettable (L, 2);


More information about the Commits mailing list