Skip to content

Commit

Permalink
Merge pull request #5687 from cakebaker/ls_remove_condition
Browse files Browse the repository at this point in the history
ls: remove condition with unreachable "else" block
  • Loading branch information
sylvestre authored Dec 21, 2023
2 parents d305ccd + f16a4ae commit 95852db
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/uu/ls/src/ls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2480,14 +2480,10 @@ fn get_block_size(md: &Metadata, config: &Config) -> u64 {
match config.size_format {
SizeFormat::Binary | SizeFormat::Decimal => raw_blocks,
SizeFormat::Bytes => {
if cfg!(unix) {
if let Some(user_block_size) = config.block_size {
raw_blocks / user_block_size
} else {
raw_blocks / DEFAULT_BLOCK_SIZE
}
if let Some(user_block_size) = config.block_size {
raw_blocks / user_block_size
} else {
raw_blocks
raw_blocks / DEFAULT_BLOCK_SIZE
}
}
}
Expand Down

0 comments on commit 95852db

Please sign in to comment.