Merge pull request #9985 from cakebaker/uptime_remove_unreachable_code

uucore/uptime: remove unreachable code on Windows
This commit is contained in:
Sylvestre Ledru
2026-01-03 11:38:04 +01:00
committed by GitHub
+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;
}