mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
du: Replace home-grown block-based size calculation with ceil_div
This commit is contained in:
parent
bb5db7fba6
commit
c938321731
Notes:
sideshowbarker
2024-07-17 08:43:03 +09:00
Author: https://github.com/timschumi
Commit: c938321731
Pull-request: https://github.com/SerenityOS/serenity/pull/14633
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