X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=common%2Fzlib.c;h=2c4834bce42689246490924b129d8fa1a41cc91f;hp=f806eb8974bca5c7132df12b3232aceb1160cf5f;hb=cf73702697c68556cb5b41944d7646b1d75f3f28;hpb=5ce2aad8a6aee9903b2e200b555bd7c141770b6a diff --git a/common/zlib.c b/common/zlib.c index f806eb8..2c4834b 100644 --- a/common/zlib.c +++ b/common/zlib.c @@ -10,11 +10,11 @@ * - added inflateIncomp and deflateOutputPending * - allow strm->next_out to be NULL, meaning discard the output * - * $Id: zlib.c,v 1.8 1997/11/27 06:03:32 paulus Exp $ + * $Id: zlib.c,v 1.11 1998/09/13 23:37:12 paulus Exp $ */ /* - * ==FILEVERSION 971127== + * ==FILEVERSION 971210== * * This marker is used by the Linux installation script to determine * whether an up-to-date version of this file is already installed. @@ -52,6 +52,7 @@ #include #include #include +#undef u # define HAVE_MEMCPY # define memcpy(d, s, n) bcopy((s), (d), (n)) # define memset(d, v, n) bzero((d), (n)) @@ -954,7 +955,7 @@ local void flush_pending(strm) if (len > strm->avail_out) len = strm->avail_out; if (len == 0) return; - if (strm->next_out != NULL) { + if (strm->next_out != Z_NULL) { zmemcpy(strm->next_out, s->pending_out, len); strm->next_out += len; } @@ -1147,12 +1148,12 @@ int deflateCopy (dest, source) return Z_STREAM_ERROR; ss = (deflate_state *) source->state; - *dest = *source; + zmemcpy(dest, source, sizeof(*dest)); ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state)); if (ds == Z_NULL) return Z_MEM_ERROR; dest->state = (struct internal_state FAR *) ds; - *ds = *ss; + zmemcpy(ds, ss, sizeof(*ds)); ds->strm = dest; ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte)); @@ -4888,7 +4889,7 @@ int r; z->adler = s->check = (*s->checkfn)(s->check, q, n); /* copy as far as end of window */ - if (p != NULL) { + if (p != Z_NULL) { zmemcpy(p, q, n); p += n; } @@ -4916,7 +4917,7 @@ int r; z->adler = s->check = (*s->checkfn)(s->check, q, n); /* copy */ - if (p != NULL) { + if (p != Z_NULL) { zmemcpy(p, q, n); p += n; }