mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:27:46 +00:00
du: Replace home-grown block-based size calculation with ceil_div
This commit is contained in:
parent
bb5db7fba6
commit
c938321731
1 changed files with 1 additions and 1 deletions
|
@ -162,7 +162,7 @@ ErrorOr<off_t> print_space_usage(String const& path, DuOption const& du_option,
|
|||
out("{}", human_readable_size(size));
|
||||
} else {
|
||||
constexpr long long block_size = 1024;
|
||||
size = size / block_size + (size % block_size != 0);
|
||||
size = ceil_div(size, block_size);
|
||||
out("{}", size);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue