Commit db46d844 authored by Max Kellermann's avatar Max Kellermann

archive/bzip2: move the eof check out of the ScopeUnlock

parent 9e6c4f8d
......@@ -136,14 +136,14 @@ Bzip2InputStream::FillBuffer()
size_t
Bzip2InputStream::Read(void *ptr, size_t length)
{
if (eof)
return 0;
const ScopeUnlock unlock(mutex);
int bz_result;
size_t nbytes = 0;
if (eof)
return 0;
bzstream.next_out = (char *)ptr;
bzstream.avail_out = length;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment