File tree 3 files changed +4
-5
lines changed
3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -216,7 +216,6 @@ fn rustc_minor_nightly() -> (u32, bool) {
216
216
let output = cmd
217
217
. arg ( "--version" )
218
218
. output ( )
219
- . ok ( )
220
219
. expect ( "Failed to get rustc version" ) ;
221
220
if !output. status . success ( ) {
222
221
panic ! (
Original file line number Diff line number Diff line change @@ -5564,19 +5564,19 @@ f! {
5564
5564
return :: CMSG_FIRSTHDR ( mhdr) ;
5565
5565
} ;
5566
5566
let cmsg_len = ( * cmsg) . cmsg_len as usize ;
5567
- let next = cmsg as usize + __DARWIN_ALIGN32( cmsg_len as usize ) ;
5567
+ let next = cmsg as usize + __DARWIN_ALIGN32( cmsg_len) ;
5568
5568
let max = ( * mhdr) . msg_control as usize
5569
5569
+ ( * mhdr) . msg_controllen as usize ;
5570
5570
if next + __DARWIN_ALIGN32( :: mem:: size_of:: <:: cmsghdr>( ) ) > max {
5571
- 0 as * mut :: cmsghdr
5571
+ core :: ptr :: null_mut ( )
5572
5572
} else {
5573
5573
next as * mut :: cmsghdr
5574
5574
}
5575
5575
}
5576
5576
5577
5577
pub fn CMSG_DATA ( cmsg: * const :: cmsghdr) -> * mut :: c_uchar {
5578
5578
( cmsg as * mut :: c_uchar)
5579
- . offset ( __DARWIN_ALIGN32( :: mem:: size_of:: <:: cmsghdr>( ) ) as isize )
5579
+ . add ( __DARWIN_ALIGN32( :: mem:: size_of:: <:: cmsghdr>( ) ) )
5580
5580
}
5581
5581
5582
5582
pub { const } fn CMSG_SPACE ( length: :: c_uint) -> :: c_uint {
Original file line number Diff line number Diff line change 548
548
if ( * mhdr) . msg_controllen as usize >= :: mem:: size_of:: <:: cmsghdr>( ) {
549
549
( * mhdr) . msg_control as * mut :: cmsghdr
550
550
} else {
551
- 0 as * mut :: cmsghdr
551
+ core :: ptr :: null_mut ( )
552
552
}
553
553
}
554
554
You can’t perform that action at this time.
0 commit comments