mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:17:44 +00:00
Everywhere: Remove unintentional partial stream reads and writes
This commit is contained in:
parent
26516ee160
commit
ae51c1821c
44 changed files with 109 additions and 192 deletions
|
@ -113,8 +113,7 @@ ErrorOr<void> ZlibCompressor::write_header(ZlibCompressionMethod compression_met
|
|||
|
||||
// FIXME: Support pre-defined dictionaries.
|
||||
|
||||
// FIXME: This should write the entire span.
|
||||
TRY(m_output_stream->write_some(header.as_u16.bytes()));
|
||||
TRY(m_output_stream->write_until_depleted(header.as_u16.bytes()));
|
||||
|
||||
return {};
|
||||
}
|
||||
|
@ -155,8 +154,7 @@ ErrorOr<void> ZlibCompressor::finish()
|
|||
TRY(static_cast<DeflateCompressor*>(m_compressor.ptr())->final_flush());
|
||||
|
||||
NetworkOrdered<u32> adler_sum = m_adler32_checksum.digest();
|
||||
// FIXME: This should write the entire span.
|
||||
TRY(m_output_stream->write_some(adler_sum.bytes()));
|
||||
TRY(m_output_stream->write_value(adler_sum));
|
||||
|
||||
m_finished = true;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue