LibCrypto: Use size_t integer literal

(cherry picked from commit 3e69794c7d78e30591d62b4455a32e8a7ec0f052)
This commit is contained in:
R-Goc 2024-11-21 20:22:23 +01:00 committed by Nico Weber
parent 7ac2e83da4
commit d279123747

View file

@ -265,7 +265,7 @@ ErrorOr<void> Encoder::write_length(size_t value)
double minimum_bits = AK::log2(value);
size_t size_in_bits = AK::floor(minimum_bits) + 1;
size_t size = ceil_div(size_in_bits, 8ul);
size_t size = ceil_div(size_in_bits, 8z);
TRY(write_byte(0x80 | size));
for (size_t i = 0; i < size; i++) {
@ -433,7 +433,7 @@ ErrorOr<void> Encoder::write_bit_string(BitStringView view, Optional<Class> clas
auto total_size_in_bits = view.byte_length() * 8 - unused_bits;
TRY(write_tag(class_, type, kind));
TRY(write_length(ceil_div(total_size_in_bits, 8ul) + 1));
TRY(write_length(ceil_div(total_size_in_bits, 8z) + 1));
TRY(write_byte(unused_bits));
return write_bytes(view.underlying_bytes());
}