udp,win: fix UDP compiler warning (#3647)
Previously it would pass a pointer to uninitialized memory to WSASendTo, which triggered a compiler warning. However, `addrlen` will be 0, so it seems unlikely to trigger an error or uninitialized memory access. Refs: https://github.com/libuv/leps/pull/10 Refs: https://github.com/libuv/libuv/pull/1872 Refs: https://github.com/libuv/libuv/pull/2217
This commit is contained in:
parent
0b1c752b5c
commit
e3aaff185f
@ -1146,6 +1146,7 @@ int uv__udp_try_send(uv_udp_t* handle,
|
||||
err = uv__convert_to_localhost_if_unspecified(addr, &converted);
|
||||
if (err)
|
||||
return err;
|
||||
addr = (const struct sockaddr*) &converted;
|
||||
}
|
||||
|
||||
/* Already sending a message.*/
|
||||
@ -1169,7 +1170,7 @@ int uv__udp_try_send(uv_udp_t* handle,
|
||||
nbufs,
|
||||
&bytes,
|
||||
0,
|
||||
(const struct sockaddr*) &converted,
|
||||
addr,
|
||||
addrlen,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user