Skip to content

Conversation

@cakebaker
Copy link
Contributor

On lines 337 - 339 we have the following code:

if result == 0 || buffer.is_null() {
    continue;
}

On line 341 we check whether the buffer is not null. Due to the code above buffer can't be null at this point, thus the check is unnecessary and the else part is unreachable.

let username = if !buffer.is_null() {
    // do something
} else {
    // do something else
};

@cakebaker cakebaker force-pushed the uptime_remove_unreachable_code branch from 68676b6 to fdf1409 Compare January 2, 2026 15:46
@sylvestre sylvestre merged commit baebd29 into uutils:main Jan 3, 2026
127 of 128 checks passed
@cakebaker cakebaker deleted the uptime_remove_unreachable_code branch January 3, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants