summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibuv/src/win/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'Utilities/cmlibuv/src/win/udp.c')
-rw-r--r--Utilities/cmlibuv/src/win/udp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Utilities/cmlibuv/src/win/udp.c b/Utilities/cmlibuv/src/win/udp.c
index 9bf1453..2fd15cf 100644
--- a/Utilities/cmlibuv/src/win/udp.c
+++ b/Utilities/cmlibuv/src/win/udp.c
@@ -142,8 +142,7 @@ int uv_udp_init_ex(uv_loop_t* loop, uv_udp_t* handle, unsigned int flags) {
handle->func_wsarecvfrom = WSARecvFrom;
handle->send_queue_size = 0;
handle->send_queue_count = 0;
- uv_req_init(loop, (uv_req_t*) &(handle->recv_req));
- handle->recv_req.type = UV_UDP_RECV;
+ UV_REQ_INIT(&handle->recv_req, UV_UDP_RECV);
handle->recv_req.data = handle;
/* If anything fails beyond this point we need to remove the handle from
@@ -417,8 +416,7 @@ static int uv__send(uv_udp_send_t* req,
uv_loop_t* loop = handle->loop;
DWORD result, bytes;
- uv_req_init(loop, (uv_req_t*) req);
- req->type = UV_UDP_SEND;
+ UV_REQ_INIT(req, UV_UDP_SEND);
req->handle = handle;
req->cb = cb;
memset(&req->u.io.overlapped, 0, sizeof(req->u.io.overlapped));