File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ pub fn main() {
1212 }
1313}
1414unsafe fn main_0 ( ) -> i32 {
15- let mut s: * const u8 = b"hello world\0 " . as_ptr ( ) . cast_mut ( ) . cast_const ( ) ;
16- let mut r: * mut u8 = libc:: strchr ( s as * const i8 , ( 'w' as i32 ) ) as * mut u8 ;
15+ let mut s: * const u8 = ( b"hello world\0 " . as_ptr ( ) . cast_mut ( ) ) . cast_const ( ) ;
16+ let mut r: * const u8 = ( libc:: strchr ( s as * const i8 , ( 'w' as i32 ) ) as * mut u8 ) . cast_const ( ) ;
1717 assert ! ( ( ( ( !( ( r) . is_null( ) ) ) as i32 ) != 0 ) ) ;
1818 assert ! ( ( ( ( ( ( * r) as i32 ) == ( 'w' as i32 ) ) as i32 ) != 0 ) ) ;
1919 assert ! ( ( ( ( ( libc:: strchr( s as * const i8 , ( 'z' as i32 ) ) as * mut u8 ) . is_null( ) ) as i32 ) != 0 ) ) ;
Original file line number Diff line number Diff line change 44
55int main () {
66 const char * s = "hello world" ;
7- char * r = strchr (s , 'w' );
7+ const char * r = strchr (s , 'w' );
88 assert (r != NULL );
99 assert (* r == 'w' );
1010 assert (strchr (s , 'z' ) == NULL );
You can’t perform that action at this time.
0 commit comments