File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -51,13 +51,11 @@ use libc::MSG_NOSIGNAL;
51
51
const MSG_NOSIGNAL : libc:: c_int = 0x0 ;
52
52
53
53
fn sun_path_offset ( ) -> usize {
54
- unsafe {
55
- // Work with an actual instance of the type since using a null pointer is UB
56
- let addr: libc:: sockaddr_un = mem:: uninitialized ( ) ;
57
- let base = & addr as * const _ as usize ;
58
- let path = & addr. sun_path as * const _ as usize ;
59
- path - base
60
- }
54
+ // Work with an actual instance of the type since using a null pointer is UB
55
+ let addr: libc:: sockaddr_un = unsafe { mem:: uninitialized ( ) } ;
56
+ let base = & addr as * const _ as usize ;
57
+ let path = & addr. sun_path as * const _ as usize ;
58
+ path - base
61
59
}
62
60
63
61
unsafe fn sockaddr_un ( path : & Path ) -> io:: Result < ( libc:: sockaddr_un , libc:: socklen_t ) > {
You can’t perform that action at this time.
0 commit comments