Patchwork [2/3] pstore: Use zlib_inflateInit2 instead of zlib_inflateInit

login
register
mail settings
Submitter Aruna Balakrishnaiah
Date Sept. 11, 2013, 12:07 p.m.
Message ID <20130911120710.27730.30968.stgit@aruna-ThinkPad-T420>
Download mbox | patch
Permalink /patch/274264/
State Not Applicable
Headers show

Comments

Aruna Balakrishnaiah - Sept. 11, 2013, 12:07 p.m.
Since zlib_deflateInit2() is used for specifying window bit during compression,
zlib_inflateInit2() is appropriate for decompression.

Reported-by: Seiji Aguchi <seiji.aguchi@hds.com>
Signed-off-by: Aruna Balakrishnaiah <aruna@linux.vnet.ibm.com>
---
 fs/pstore/platform.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 4efaa75..18924c7 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -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;