mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-11-08 06:18:21 +01:00
Removed some warnings.
This commit is contained in:
parent
168fe9bacf
commit
6fd40adc77
@ -1113,13 +1113,13 @@ static int set_option(lua_State *L, p_sock sock)
|
||||
lua_gettable(L, -2);
|
||||
if (!lua_isnumber(L, -1))
|
||||
lua_error(L, "invalid SO_LINGER (l_onoff) value");
|
||||
linger.l_onoff = lua_tonumber(L, -1);
|
||||
linger.l_onoff = (int) lua_tonumber(L, -1);
|
||||
lua_pop(L, 1);
|
||||
lua_pushstring(L, "l_linger");
|
||||
lua_gettable(L, -2);
|
||||
if (!lua_isnumber(L, -1))
|
||||
lua_error(L, "invalid SO_LINGER (l_linger) value");
|
||||
linger.l_linger = lua_tonumber(L, -1);
|
||||
linger.l_linger = (int) lua_tonumber(L, -1);
|
||||
lua_pop(L, 1);
|
||||
err = setsockopt(sock->sock, SOL_SOCKET, SO_LINGER,
|
||||
(char *) &linger, sizeof(linger));
|
||||
|
Loading…
Reference in New Issue
Block a user