summaryrefslogtreecommitdiff
path: root/src/sys
diff options
context:
space:
mode:
authorAlex Saveau <saveau.alexandre@gmail.com>2022-12-04 11:44:33 -0800
committerAlex Saveau <saveau.alexandre@gmail.com>2022-12-04 11:54:02 -0800
commit59f66d128b6664ff618e12c193ec2adc4a862f2f (patch)
tree177a6716eebf17604bfa2852e354b2649842a375 /src/sys
parentbedf83bf0b469cc82d10c82a62dd3726655ce3e0 (diff)
downloadnix-59f66d128b6664ff618e12c193ec2adc4a862f2f.zip
Move some pure formatting changes out of #1863
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
Diffstat (limited to 'src/sys')
-rw-r--r--src/sys/socket/mod.rs18
1 files changed, 6 insertions, 12 deletions
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<T: SockaddrLike>(
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<T: SockaddrLike>(fd: RawFd) -> Result<T> {
let mut addr = mem::MaybeUninit::<T>::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<T: SockaddrLike>(fd: RawFd) -> Result<T> {
let mut addr = mem::MaybeUninit::<T>::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)?;