summaryrefslogtreecommitdiffstats
path: root/lib/libz/uncompr.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libz/uncompr.c')
-rw-r--r--lib/libz/uncompr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libz/uncompr.c b/lib/libz/uncompr.c
index 06cd6a8..b1bd9fc 100644
--- a/lib/libz/uncompr.c
+++ b/lib/libz/uncompr.c
@@ -1,5 +1,5 @@
/* uncompr.c -- decompress a memory buffer
- * Copyright (C) 1995-1996 Jean-loup Gailly.
+ * Copyright (C) 1995-1998 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -22,7 +22,7 @@
enough memory, Z_BUF_ERROR if there was not enough room in the output
buffer, or Z_DATA_ERROR if the input data was corrupted.
*/
-int uncompress (dest, destLen, source, sourceLen)
+int ZEXPORT uncompress (dest, destLen, source, sourceLen)
Bytef *dest;
uLongf *destLen;
const Bytef *source;
@@ -49,7 +49,7 @@ int uncompress (dest, destLen, source, sourceLen)
err = inflate(&stream, Z_FINISH);
if (err != Z_STREAM_END) {
inflateEnd(&stream);
- return err;
+ return err == Z_OK ? Z_BUF_ERROR : err;
}
*destLen = stream.total_out;
OpenPOWER on IntegriCloud