We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9aaae0 commit 4dd8b2cCopy full SHA for 4dd8b2c
1 file changed
src/lib.rs
@@ -53,7 +53,7 @@ pub unsafe extern "C" fn malloc(len: usize) -> *mut c_void {
53
0,
54
);
55
if ptr == libc::MAP_FAILED {
56
- libc::PT_NULL as *mut libc::c_void
+ ptr::null_mut()
57
} else {
58
// This is guaranteed to be aligned
59
*(ptr as *mut usize) = full_len;
@@ -83,7 +83,7 @@ pub unsafe extern "C" fn calloc(n_items: usize, item_len: usize) -> *mut c_void
83
84
85
86
87
88
89
0 commit comments