Skip to content

Commit 170cf02

Browse files
author
Phillip Lougher
committed
Squashfs: remove unnecessary variable in zlib_wrapper
Get rid of unnecessary bytes variable, and remove redundant initialisation of zlib_err. Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
1 parent 7a43ae5 commit 170cf02

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

‎fs/squashfs/zlib_wrapper.c‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,20 +66,19 @@ static int zlib_uncompress(struct squashfs_sb_info *msblk, void **buffer,
6666
struct buffer_head **bh, int b, int offset, int length, int srclength,
6767
int pages)
6868
{
69-
int zlib_err = 0, zlib_init = 0;
70-
int avail, bytes, k = 0, page = 0;
69+
int zlib_err, zlib_init = 0;
70+
int k = 0, page = 0;
7171
z_stream *stream = msblk->stream;
7272

7373
mutex_lock(&msblk->read_data_mutex);
7474

7575
stream->avail_out = 0;
7676
stream->avail_in = 0;
7777

78-
bytes = length;
7978
do {
8079
if (stream->avail_in == 0 && k < b) {
81-
avail = min(bytes, msblk->devblksize - offset);
82-
bytes -= avail;
80+
int avail = min(length, msblk->devblksize - offset);
81+
length -= avail;
8382
wait_on_buffer(bh[k]);
8483
if (!buffer_uptodate(bh[k]))
8584
goto release_mutex;

0 commit comments

Comments
 (0)