Minor cleanup

This commit is contained in:
topjohnwu
2023-12-03 19:32:58 +08:00
parent 4e99997013
commit 1dcf325547
6 changed files with 38 additions and 44 deletions
+1 -9
View File
@@ -97,16 +97,8 @@ impl MagiskD {
}
}
mod cxx_extern {
use base::libc::c_char;
extern "C" {
pub fn get_magisk_tmp() -> *const c_char;
}
}
pub fn get_magisk_tmp() -> &'static Utf8CStr {
unsafe { Utf8CStr::from_ptr(cxx_extern::get_magisk_tmp()).unwrap_unchecked() }
unsafe { Utf8CStr::from_ptr(super::ffi::get_magisk_tmp()).unwrap_unchecked() }
}
pub fn daemon_entry() {