aboutsummaryrefslogtreecommitdiff
path: root/compress.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:14:39 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:14:39 -0700
commit423eb40306489f9c88f7dba32c2f69179166730b (patch)
treeb5a83b0b1e52bbe0de973dcbc7ec008c1d7cf7d9 /compress.c
parent8a2acbffc86012de3523ecf91db2c4ea1b1c4ea2 (diff)
downloadzlib-423eb40306489f9c88f7dba32c2f69179166730b.tar.gz
zlib-423eb40306489f9c88f7dba32c2f69179166730b.tar.bz2
zlib-423eb40306489f9c88f7dba32c2f69179166730b.zip
zlib 1.0.1v1.0.1
Diffstat (limited to 'compress.c')
-rw-r--r--compress.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/compress.c b/compress.c
index 5addd8d..1c58400 100644
--- a/compress.c
+++ b/compress.c
@@ -1,9 +1,9 @@
1/* compress.c -- compress a memory buffer 1/* compress.c -- compress a memory buffer
2 * Copyright (C) 1995 Jean-loup Gailly. 2 * Copyright (C) 1995-1996 Jean-loup Gailly.
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.6 1995/05/03 17:27:08 jloup Exp $ */ 6/* $Id: compress.c,v 1.9 1996/01/30 21:59:09 me Exp $ */
7 7
8#include "zlib.h" 8#include "zlib.h"
9 9
@@ -22,13 +22,13 @@
22int compress (dest, destLen, source, sourceLen) 22int compress (dest, destLen, source, sourceLen)
23 Bytef *dest; 23 Bytef *dest;
24 uLongf *destLen; 24 uLongf *destLen;
25 Bytef *source; 25 const Bytef *source;
26 uLong sourceLen; 26 uLong sourceLen;
27{ 27{
28 z_stream stream; 28 z_stream stream;
29 int err; 29 int err;
30 30
31 stream.next_in = source; 31 stream.next_in = (Bytef*)source;
32 stream.avail_in = (uInt)sourceLen; 32 stream.avail_in = (uInt)sourceLen;
33 /* Check for source > 64K on 16-bit machine: */ 33 /* Check for source > 64K on 16-bit machine: */
34 if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; 34 if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR;