archive/bzip2: move the eof check out of the ScopeUnlock
This commit is contained in:
parent
9e6c4f8d80
commit
db46d84458
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user