diff options
author | libuv upstream <libuv@googlegroups.com> | 2017-05-09 19:51:26 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-05-15 14:43:03 (GMT) |
commit | 12a78bc824655524d817508d6107ef4dcf8e3626 (patch) | |
tree | 39bcf5989f7696efbb2cb777b1ce5b0062df7939 /src/win/udp.c | |
parent | 1f661e87a6a8304edb77bd30b546e5d113477c59 (diff) | |
download | CMake-12a78bc824655524d817508d6107ef4dcf8e3626.zip CMake-12a78bc824655524d817508d6107ef4dcf8e3626.tar.gz CMake-12a78bc824655524d817508d6107ef4dcf8e3626.tar.bz2 |
libuv 2017-05-09 (e11dcd43)
Code extracted from:
https://github.com/libuv/libuv.git
at commit e11dcd4377185359874e67f4962995fdb7e83d19 (v1.x).
Diffstat (limited to 'src/win/udp.c')
-rw-r--r-- | src/win/udp.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/win/udp.c b/src/win/udp.c index 9bf1453..2fd15cf 100644 --- a/src/win/udp.c +++ b/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)); |