From 59f66d128b6664ff618e12c193ec2adc4a862f2f Mon Sep 17 00:00:00 2001 From: Alex Saveau Date: Sun, 4 Dec 2022 11:44:33 -0800 Subject: Move some pure formatting changes out of #1863 Signed-off-by: Alex Saveau --- src/sys/socket/mod.rs | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'src/sys') diff --git a/src/sys/socket/mod.rs b/src/sys/socket/mod.rs index 5a164171..eea74cf6 100644 --- a/src/sys/socket/mod.rs +++ b/src/sys/socket/mod.rs @@ -2221,14 +2221,14 @@ pub fn recvfrom( buf.as_ptr() as *mut c_void, buf.len() as size_t, 0, - addr.as_mut_ptr() as *mut libc::sockaddr, + addr.as_mut_ptr() as *mut sockaddr, &mut len as *mut socklen_t, ))? as usize; Ok(( ret, T::from_raw( - addr.assume_init().as_ptr() as *const libc::sockaddr, + addr.assume_init().as_ptr() as *const sockaddr, Some(len), ), )) @@ -2336,11 +2336,8 @@ pub fn getpeername(fd: RawFd) -> Result { let mut addr = mem::MaybeUninit::::uninit(); let mut len = T::size(); - let ret = libc::getpeername( - fd, - addr.as_mut_ptr() as *mut libc::sockaddr, - &mut len, - ); + let ret = + libc::getpeername(fd, addr.as_mut_ptr() as *mut sockaddr, &mut len); Errno::result(ret)?; @@ -2356,11 +2353,8 @@ pub fn getsockname(fd: RawFd) -> Result { let mut addr = mem::MaybeUninit::::uninit(); let mut len = T::size(); - let ret = libc::getsockname( - fd, - addr.as_mut_ptr() as *mut libc::sockaddr, - &mut len, - ); + let ret = + libc::getsockname(fd, addr.as_mut_ptr() as *mut sockaddr, &mut len); Errno::result(ret)?; -- cgit v1.2.3