File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -5760,19 +5760,19 @@ f! {
5760
5760
return :: CMSG_FIRSTHDR ( mhdr) ;
5761
5761
} ;
5762
5762
let cmsg_len = ( * cmsg) . cmsg_len as usize ;
5763
- let next = cmsg as usize + __DARWIN_ALIGN32( cmsg_len as usize ) ;
5763
+ let next = cmsg as usize + __DARWIN_ALIGN32( cmsg_len) ;
5764
5764
let max = ( * mhdr) . msg_control as usize
5765
5765
+ ( * mhdr) . msg_controllen as usize ;
5766
5766
if next + __DARWIN_ALIGN32( :: mem:: size_of:: <:: cmsghdr>( ) ) > max {
5767
- 0 as * mut :: cmsghdr
5767
+ core :: ptr :: null_mut ( )
5768
5768
} else {
5769
5769
next as * mut :: cmsghdr
5770
5770
}
5771
5771
}
5772
5772
5773
5773
pub fn CMSG_DATA ( cmsg: * const :: cmsghdr) -> * mut :: c_uchar {
5774
5774
( cmsg as * mut :: c_uchar)
5775
- . offset ( __DARWIN_ALIGN32( :: mem:: size_of:: <:: cmsghdr>( ) ) as isize )
5775
+ . add ( __DARWIN_ALIGN32( :: mem:: size_of:: <:: cmsghdr>( ) ) )
5776
5776
}
5777
5777
5778
5778
pub { const } fn CMSG_SPACE ( length: :: c_uint) -> :: c_uint {
Original file line number Diff line number Diff line change 591
591
if ( * mhdr) . msg_controllen as usize >= :: mem:: size_of:: <:: cmsghdr>( ) {
592
592
( * mhdr) . msg_control as * mut :: cmsghdr
593
593
} else {
594
- 0 as * mut :: cmsghdr
594
+ core :: ptr :: null_mut ( )
595
595
}
596
596
}
597
597
You can’t perform that action at this time.
0 commit comments