File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -63,11 +63,6 @@ name = "linux-termios"
63
63
path = " test/linux_termios.rs"
64
64
harness = false
65
65
66
- [[test ]]
67
- name = " cmsg"
68
- path = " test/cmsg.rs"
69
- harness = true
70
-
71
66
[[test ]]
72
67
name = " makedev"
73
68
path = " test/makedev.rs"
Original file line number Diff line number Diff line change @@ -55,7 +55,6 @@ mod t {
55
55
#[ cfg( not( target_arch = "sparc64" ) ) ]
56
56
#[ test]
57
57
fn test_cmsg_nxthdr ( ) {
58
- use std:: ptr;
59
58
// Helps to align the buffer on the stack.
60
59
#[ repr( align( 8 ) ) ]
61
60
struct Align8 < T > ( T ) ;
@@ -65,7 +64,7 @@ mod t {
65
64
let mut mhdr: msghdr = unsafe { mem:: zeroed ( ) } ;
66
65
for start_ofs in 0 ..64 {
67
66
let pcmsghdr = buffer. 0 . as_mut_ptr ( ) . cast :: < cmsghdr > ( ) ;
68
- mhdr. msg_control = pcmsghdr as * mut c_void ;
67
+ mhdr. msg_control = pcmsghdr. cast :: < c_void > ( ) ;
69
68
mhdr. msg_controllen = ( 160 - start_ofs) as _ ;
70
69
for cmsg_len in 0 ..64 {
71
70
// Address must be a multiple of 0x4 for testing on AIX.
@@ -80,7 +79,7 @@ mod t {
80
79
let next = cmsg_nxthdr ( & mhdr, pcmsghdr) ;
81
80
assert_eq ! ( libc_next, next) ;
82
81
83
- if libc_next != ptr :: null_mut ( ) {
82
+ if !libc_next . is_null ( ) {
84
83
( * libc_next) . cmsg_len = next_cmsg_len;
85
84
let libc_next = libc:: CMSG_NXTHDR ( & mhdr, pcmsghdr) ;
86
85
let next = cmsg_nxthdr ( & mhdr, pcmsghdr) ;
You can’t perform that action at this time.
0 commit comments