Cleanup allocation functions
This commit is contained in:
@@ -191,7 +191,7 @@ pub unsafe extern "C" fn strndup(s1: *const c_char, size: usize) -> *mut c_char
|
||||
let len = strnlen(s1, size);
|
||||
|
||||
// the "+ 1" is to account for the NUL byte
|
||||
let buffer = platform::alloc(len + 1, 16, 8) as *mut c_char;
|
||||
let buffer = platform::alloc(len + 1) as *mut c_char;
|
||||
if buffer.is_null() {
|
||||
platform::errno = ENOMEM as c_int;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user