Convert more Pal methods to Result.

This commit is contained in:
4lDO2
2024-09-22 20:03:10 +02:00
parent 6e5959b3fa
commit 4b687c25d2
14 changed files with 330 additions and 348 deletions
+2 -1
View File
@@ -985,7 +985,8 @@ pub unsafe extern "C" fn realpath(pathname: *const c_char, resolved: *mut c_char
};
let len = out.len();
let read = Sys::fpath(*file, &mut out[..len - 1]);
// TODO: better error handling
let read = Sys::fpath(*file, &mut out[..len - 1]).or_minus_one_errno();
if read < 0 {
return ptr::null_mut();
}