aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_common.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-10-12 20:33:48 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-10-12 20:33:48 +0100
commite2e021a18220d7966cd7888db912e98108d717f7 (patch)
treec6a3139c12026bf7afe4ab8fc8059249a3837a8b /src/lua/lua_common.c
parentb68e6b885974acbbf75b244224ca87b2fcf304fc (diff)
downloadrspamd-e2e021a18220d7966cd7888db912e98108d717f7.tar.gz
rspamd-e2e021a18220d7966cd7888db912e98108d717f7.zip
[Minor] Fix some minor code quality issue
Found by: coverity scan
Diffstat (limited to 'src/lua/lua_common.c')
-rw-r--r--src/lua/lua_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c
index cd557f816..ab411fa66 100644
--- a/src/lua/lua_common.c
+++ b/src/lua/lua_common.c
@@ -1001,10 +1001,10 @@ rspamd_lua_init (bool wipe_mem)
/* Set PRNG */
lua_getglobal (L, "math");
- lua_pushstring (L, "randomseed");
+ lua_pushstring (L, "randomseed"); /* Push math.randomseed function on top of the stack */
lua_gettable (L, -2);
lua_pushinteger (L, ottery_rand_uint64 ());
- lua_pcall (L, 1, 0, 0);
+ g_assert (lua_pcall (L, 1, 0, 0) == 0);
lua_pop (L, 1); /* math table */
/* Modules state */