uucore/uptime: remove unreachable code on Windows

This commit is contained in:
Daniel Hofstetter
2026-01-02 16:46:09 +01:00
parent 0566dfc6ef
commit fdf14099b7
+2 -7
View File
@@ -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;
}