diff options
Diffstat (limited to 'src/tcp.c')
-rw-r--r-- | src/tcp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -117,7 +117,7 @@ static int meth_receive(lua_State *L) | |||
117 | \*-------------------------------------------------------------------------*/ | 117 | \*-------------------------------------------------------------------------*/ |
118 | static int meth_setoption(lua_State *L) | 118 | static int meth_setoption(lua_State *L) |
119 | { | 119 | { |
120 | p_tcp tcp = aux_checkgroup(L, "tcp{any}", 1); | 120 | p_tcp tcp = (p_tcp) aux_checkgroup(L, "tcp{any}", 1); |
121 | return opt_meth_setoption(L, opt, &tcp->sock); | 121 | return opt_meth_setoption(L, opt, &tcp->sock); |
122 | } | 122 | } |
123 | 123 | ||
@@ -158,7 +158,7 @@ static int meth_accept(lua_State *L) | |||
158 | const char *err = sock_accept(&server->sock, &sock, NULL, NULL, tm); | 158 | const char *err = sock_accept(&server->sock, &sock, NULL, NULL, tm); |
159 | /* if successful, push client socket */ | 159 | /* if successful, push client socket */ |
160 | if (!err) { | 160 | if (!err) { |
161 | p_tcp clnt = lua_newuserdata(L, sizeof(t_tcp)); | 161 | p_tcp clnt = (p_tcp) lua_newuserdata(L, sizeof(t_tcp)); |
162 | aux_setclass(L, "tcp{client}", -1); | 162 | aux_setclass(L, "tcp{client}", -1); |
163 | /* initialize structure fields */ | 163 | /* initialize structure fields */ |
164 | sock_setnonblocking(&sock); | 164 | sock_setnonblocking(&sock); |