Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
990f631c
Commit
990f631c
authored
Sep 04, 2020
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
archive/bzip2: make variables more local
parent
db46d844
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
Bzip2ArchivePlugin.cxx
src/archive/plugins/Bzip2ArchivePlugin.cxx
+2
-5
No files found.
src/archive/plugins/Bzip2ArchivePlugin.cxx
View file @
990f631c
...
...
@@ -141,16 +141,13 @@ Bzip2InputStream::Read(void *ptr, size_t length)
const
ScopeUnlock
unlock
(
mutex
);
int
bz_result
;
size_t
nbytes
=
0
;
bzstream
.
next_out
=
(
char
*
)
ptr
;
bzstream
.
avail_out
=
length
;
do
{
const
bool
had_input
=
FillBuffer
();
bz_result
=
BZ2_bzDecompress
(
&
bzstream
);
const
int
bz_result
=
BZ2_bzDecompress
(
&
bzstream
);
if
(
bz_result
==
BZ_STREAM_END
)
{
eof
=
true
;
...
...
@@ -164,7 +161,7 @@ Bzip2InputStream::Read(void *ptr, size_t length)
throw
std
::
runtime_error
(
"Unexpected end of bzip2 file"
);
}
while
(
bzstream
.
avail_out
==
length
);
nbytes
=
length
-
bzstream
.
avail_out
;
const
size_t
nbytes
=
length
-
bzstream
.
avail_out
;
offset
+=
nbytes
;
return
nbytes
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment