From e5bd9ba193fe9e30108e0197d09aa8aa48c95d88 Mon Sep 17 00:00:00 2001 From: Jarred Allen Date: Mon, 22 May 2023 12:43:03 -0700 Subject: Fixup accidentally-introduced changes --- src/sys/socket/mod.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index 78b7e8b0..6690273b 100644 --- a/src/sys/socket/mod.rs +++ b/src/sys/socket/mod.rs @@ -1626,9 +1626,7 @@ impl MultiHeaders { Some(v) => ((&v[ix * msg_controllen] as *const u8), msg_controllen), None => (std::ptr::null(), 0), }; - let msg_hdr = unsafe { - pack_mhdr_to_receive(std::ptr::null(), 0, ptr, cap, address.assume_init_mut()) - }; + let msg_hdr = unsafe { pack_mhdr_to_receive(std::ptr::null(), 0, ptr, cap, address.as_mut_ptr()) }; libc::mmsghdr { msg_hdr, msg_len: 0, @@ -1964,7 +1962,10 @@ unsafe fn pack_mhdr_to_receive( cmsg_buffer: *const u8, cmsg_capacity: usize, address: *mut S, -) -> msghdr where S: SockaddrLike { +) -> msghdr + where + S: SockaddrLike +{ // Musl's msghdr has private fields, so this is the only way to // initialize it. let mut mhdr = mem::MaybeUninit::::zeroed(); @@ -2052,7 +2053,7 @@ pub fn recvmsg<'a, 'outer, 'inner, S>(fd: RawFd, iov: &'outer mut [IoSliceMut<'i where S: SockaddrLike + 'a, 'inner: 'outer { - let mut address: mem::MaybeUninit = mem::MaybeUninit::zeroed(); + let mut address = mem::MaybeUninit::zeroed(); let (msg_control, msg_controllen) = cmsg_buffer.as_mut() .map(|v| (v.as_mut_ptr(), v.capacity())) -- cgit v1.2.3