Skip to content

Commit

Permalink
pstore: Use zlib_inflateInit2 instead of zlib_inflateInit
Browse files Browse the repository at this point in the history
Since zlib_deflateInit2() is used for specifying window bit during compression,
zlib_inflateInit2() is appropriate for decompression.

Reported-by: Seiji Aguchi <[email protected]>
Tested-by: Seiji Aguchi <[email protected]>
Signed-off-by: Aruna Balakrishnaiah <[email protected]>
Signed-off-by: Tony Luck <[email protected]>
  • Loading branch information
arunabal authored and aegl committed Sep 16, 2013
1 parent 7de8fe2 commit b61edf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/pstore/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ static int pstore_decompress(void *in, void *out, size_t inlen, size_t outlen)
int err, ret;

ret = -EIO;
err = zlib_inflateInit(&stream);
err = zlib_inflateInit2(&stream, WINDOW_BITS);
if (err != Z_OK)
goto error;

Expand Down

0 comments on commit b61edf8

Please sign in to comment.