From: Vsevolod Stakhov Date: Mon, 17 Jun 2019 15:55:31 +0000 (+0100) Subject: [Minor] Try to fix types X-Git-Tag: 2.0~768 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=e39008c291e4b7bede0328df76fccd06b33c5703;p=rspamd.git [Minor] Try to fix types --- diff --git a/src/lua/lua_task.c b/src/lua/lua_task.c index 8359ccd9c..d1abe6a2b 100644 --- a/src/lua/lua_task.c +++ b/src/lua/lua_task.c @@ -4883,7 +4883,7 @@ lua_task_get_settings_id (lua_State *L) if (task != NULL) { if (task->settings_elt) { - lua_pushnumber (L, task->settings_elt->id); + lua_pushinteger (L, task->settings_elt->id); } else { lua_pushnil (L); @@ -4901,7 +4901,7 @@ lua_task_set_settings_id (lua_State *L) { LUA_TRACE_POINT; struct rspamd_task *task = lua_check_task (L, 1); - guint32 id = luaL_checknumber (L, 2); + guint32 id = lua_tointeger (L, 2); if (task != NULL && id != 0) { @@ -4916,7 +4916,7 @@ lua_task_set_settings_id (lua_State *L) id); if (!task->settings_elt) { - return luaL_error (L, "settings id %d is unknown", id); + return luaL_error (L, "settings id %u is unknown", id); } }