diff options
author | Phillip Lougher <phillip@lougher.demon.co.uk> | 2011-01-05 12:52:26 -0500 |
---|---|---|
committer | Phillip Lougher <phillip@lougher.demon.co.uk> | 2011-01-13 16:20:52 -0500 |
commit | 170cf02165272dfe026eba183563bad973ca4f05 (patch) | |
tree | ac67de416d11ba535909d982fcfd4d68d21c3551 /fs/squashfs | |
parent | 7a43ae523744c01b6187013e781f44c2281c579c (diff) |
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>
Diffstat (limited to 'fs/squashfs')
-rw-r--r-- | fs/squashfs/zlib_wrapper.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/squashfs/zlib_wrapper.c b/fs/squashfs/zlib_wrapper.c index 7a603874e483..1f4833b87ea3 100644 --- a/fs/squashfs/zlib_wrapper.c +++ b/fs/squashfs/zlib_wrapper.c | |||
@@ -66,8 +66,8 @@ static int zlib_uncompress(struct squashfs_sb_info *msblk, void **buffer, | |||
66 | struct buffer_head **bh, int b, int offset, int length, int srclength, | 66 | struct buffer_head **bh, int b, int offset, int length, int srclength, |
67 | int pages) | 67 | int pages) |
68 | { | 68 | { |
69 | int zlib_err = 0, zlib_init = 0; | 69 | int zlib_err, zlib_init = 0; |
70 | int avail, bytes, k = 0, page = 0; | 70 | int k = 0, page = 0; |
71 | z_stream *stream = msblk->stream; | 71 | z_stream *stream = msblk->stream; |
72 | 72 | ||
73 | mutex_lock(&msblk->read_data_mutex); | 73 | mutex_lock(&msblk->read_data_mutex); |
@@ -75,11 +75,10 @@ static int zlib_uncompress(struct squashfs_sb_info *msblk, void **buffer, | |||
75 | stream->avail_out = 0; | 75 | stream->avail_out = 0; |
76 | stream->avail_in = 0; | 76 | stream->avail_in = 0; |
77 | 77 | ||
78 | bytes = length; | ||
79 | do { | 78 | do { |
80 | if (stream->avail_in == 0 && k < b) { | 79 | if (stream->avail_in == 0 && k < b) { |
81 | avail = min(bytes, msblk->devblksize - offset); | 80 | int avail = min(length, msblk->devblksize - offset); |
82 | bytes -= avail; | 81 | length -= avail; |
83 | wait_on_buffer(bh[k]); | 82 | wait_on_buffer(bh[k]); |
84 | if (!buffer_uptodate(bh[k])) | 83 | if (!buffer_uptodate(bh[k])) |
85 | goto release_mutex; | 84 | goto release_mutex; |