mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-05 07:27:46 +00:00
parent
bde309a29f
commit
ce733b38a9
1 changed files with 1 additions and 1 deletions
|
@ -128,7 +128,7 @@ pub fn get_pw_from_args(free: &Vec<String>) -> Option<c_passwd> {
|
||||||
} else {
|
} else {
|
||||||
let pw_pointer = unsafe {
|
let pw_pointer = unsafe {
|
||||||
let cstr = CString::new(username).unwrap();
|
let cstr = CString::new(username).unwrap();
|
||||||
getpwnam(cstr.as_bytes_with_nul().as_ptr() as *const i8)
|
getpwnam(cstr.as_bytes_with_nul().as_ptr() as *const _)
|
||||||
};
|
};
|
||||||
if !pw_pointer.is_null() {
|
if !pw_pointer.is_null() {
|
||||||
Some(unsafe { read(pw_pointer) })
|
Some(unsafe { read(pw_pointer) })
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue