Skip to content

Commit ab8935a

Browse files
committed
Update tests
1 parent 8e4efe3 commit ab8935a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎tests/unit/out/unsafe/errno.rs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@ pub unsafe fn test_errno_0() {
1717
}
1818
pub unsafe fn test_errno_preserved_across_strdup_1() {
1919
(*libcc2rs::cpp2rust_errno()) = 99;
20-
let mut d: *mut u8 = libcc2rs::strdup_unsafe((b"hello\0".as_ptr().cast_mut()).cast_const());
20+
let mut d: *mut u8 =
21+
libc::strdup((b"hello\0".as_ptr().cast_mut()).cast_const() as *const i8) as *mut u8;
2122
assert!((((!((d).is_null())) as i32) != 0));
2223
assert!(((((*libcc2rs::cpp2rust_errno()) == (99)) as i32) != 0));
23-
libcc2rs::free_unsafe((d as *mut u8 as *mut ::libc::c_void));
24+
libc::free((d as *mut u8 as *mut ::libc::c_void));
2425
(*libcc2rs::cpp2rust_errno()) = 0;
2526
}
2627
pub unsafe fn test_errno_from_fseek_2() {

0 commit comments

Comments
 (0)