about summary refs log tree commit diff
path: root/library/std/src/os/unix/ucred.rs
diff options
context:
space:
mode:
authorPavel Grigorenko <grigorenkopv@ya.ru>2024-02-24 16:02:17 +0300
committerPavel Grigorenko <grigorenkopv@ya.ru>2024-02-24 16:02:17 +0300
commitff187a92d84f352670a9a63e8519eac114456d38 (patch)
treebb16e4e323011af089b5e934ca5a765216567047 /library/std/src/os/unix/ucred.rs
parent8f359beca4e58bc3ae795a666301a8f47023044c (diff)
downloadrust-ff187a92d84f352670a9a63e8519eac114456d38.tar.gz
rust-ff187a92d84f352670a9a63e8519eac114456d38.zip
library: use `addr_of!`
Diffstat (limited to 'library/std/src/os/unix/ucred.rs')
-rw-r--r--library/std/src/os/unix/ucred.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/os/unix/ucred.rs b/library/std/src/os/unix/ucred.rs
index 6a0cc2d2c48..6efa74182cc 100644
--- a/library/std/src/os/unix/ucred.rs
+++ b/library/std/src/os/unix/ucred.rs
@@ -62,7 +62,7 @@ pub mod impl_linux {
                 socket.as_raw_fd(),
                 SOL_SOCKET,
                 SO_PEERCRED,
-                &mut ucred as *mut ucred as *mut c_void,
+                core::ptr::addr_of_mut!(ucred) as *mut c_void,
                 &mut ucred_size,
             );
 
@@ -122,7 +122,7 @@ pub mod impl_mac {
                 socket.as_raw_fd(),
                 SOL_LOCAL,
                 LOCAL_PEERPID,
-                &mut pid as *mut pid_t as *mut c_void,
+                core::ptr::addr_of_mut!(pid) as *mut c_void,
                 &mut pid_size,
             );