aboutsummaryrefslogtreecommitdiff
path: root/compress.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:03:14 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:03:14 -0700
commit4ca984fb447ac57120c394cf2fbba23837ed31c2 (patch)
tree3525a9d186dbb328209747e2d57cb9642ebca0fd /compress.c
parent913afb9174bb474104049906c1382dec81826424 (diff)
downloadzlib-4ca984fb447ac57120c394cf2fbba23837ed31c2.tar.gz
zlib-4ca984fb447ac57120c394cf2fbba23837ed31c2.tar.bz2
zlib-4ca984fb447ac57120c394cf2fbba23837ed31c2.zip
zlib 0.8v0.8
Diffstat (limited to 'compress.c')
-rw-r--r--compress.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/compress.c b/compress.c
index 8edcb2a..762a9df 100644
--- a/compress.c
+++ b/compress.c
@@ -3,7 +3,7 @@
3 * For conditions of distribution and use, see copyright notice in zlib.h 3 * For conditions of distribution and use, see copyright notice in zlib.h
4 */ 4 */
5 5
6/* $Id: compress.c,v 1.4 1995/04/10 15:52:04 jloup Exp $ */ 6/* $Id: compress.c,v 1.5 1995/04/29 17:18:43 jloup Exp $ */
7 7
8#include "zlib.h" 8#include "zlib.h"
9 9
@@ -44,9 +44,9 @@ int compress (dest, destLen, source, sourceLen)
44 if (err != Z_OK) return err; 44 if (err != Z_OK) return err;
45 45
46 err = deflate(&stream, Z_FINISH); 46 err = deflate(&stream, Z_FINISH);
47 if (err != Z_OK) { 47 if (err != Z_STREAM_END) {
48 deflateEnd(&stream); 48 deflateEnd(&stream);
49 return err; 49 return err == Z_OK ? Z_BUF_ERROR : err;
50 } 50 }
51 *destLen = stream.total_out; 51 *destLen = stream.total_out;
52 52