Commit caeff6f9 authored by Sebastian Dröge's avatar Sebastian Dröge 🍵

threadshare/udpsrc: Use MaybeUninit instead of mem::zeroed()

parent 70385a48
Pipeline #47921 passed with stages
in 31 minutes and 56 seconds
......@@ -133,13 +133,14 @@ unsafe fn dup_socket(socket: usize) -> usize {
use winapi::um::processthreadsapi;
use winapi::um::winsock2;
let mut proto_info = mem::zeroed();
let mut proto_info = mem::MaybeUninit::uninit();
let ret = winsock2::WSADuplicateSocketA(
&mut proto_info,
assert_eq!(ret, 0);
let mut proto_info = prot_info.assume_init();
let socket = winsock2::WSASocketA(
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment