mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Merge pull request #9985 from cakebaker/uptime_remove_unreachable_code
uucore/uptime: remove unreachable code on Windows
This commit is contained in:
@@ -338,13 +338,8 @@ pub fn get_nusers() -> usize {
|
||||
continue;
|
||||
}
|
||||
|
||||
let username = if !buffer.is_null() {
|
||||
let cstr = std::ffi::CStr::from_ptr(buffer as *const i8);
|
||||
cstr.to_string_lossy().to_string()
|
||||
} else {
|
||||
String::new()
|
||||
};
|
||||
if !username.is_empty() {
|
||||
let cstr = std::ffi::CStr::from_ptr(buffer.cast());
|
||||
if !cstr.is_empty() {
|
||||
num_user += 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user