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"
6363path = " test/linux_termios.rs"
6464harness = false
6565
66- [[test ]]
67- name = " cmsg"
68- path = " test/cmsg.rs"
69- harness = true
70-
7166[[test ]]
7267name = " makedev"
7368path = " test/makedev.rs"
Original file line number Diff line number Diff line change @@ -55,7 +55,6 @@ mod t {
5555 #[ cfg( not( target_arch = "sparc64" ) ) ]
5656 #[ test]
5757 fn test_cmsg_nxthdr ( ) {
58- use std:: ptr;
5958 // Helps to align the buffer on the stack.
6059 #[ repr( align( 8 ) ) ]
6160 struct Align8 < T > ( T ) ;
@@ -65,7 +64,7 @@ mod t {
6564 let mut mhdr: msghdr = unsafe { mem:: zeroed ( ) } ;
6665 for start_ofs in 0 ..64 {
6766 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 > ( ) ;
6968 mhdr. msg_controllen = ( 160 - start_ofs) as _ ;
7069 for cmsg_len in 0 ..64 {
7170 // Address must be a multiple of 0x4 for testing on AIX.
@@ -80,7 +79,7 @@ mod t {
8079 let next = cmsg_nxthdr ( & mhdr, pcmsghdr) ;
8180 assert_eq ! ( libc_next, next) ;
8281
83- if libc_next != ptr :: null_mut ( ) {
82+ if !libc_next . is_null ( ) {
8483 ( * libc_next) . cmsg_len = next_cmsg_len;
8584 let libc_next = libc:: CMSG_NXTHDR ( & mhdr, pcmsghdr) ;
8685 let next = cmsg_nxthdr ( & mhdr, pcmsghdr) ;
You can’t perform that action at this time.
0 commit comments