From e9f0b78443884bfd88ead7235bcf5a6a1adae5cd Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Sun, 24 Mar 2013 15:18:02 -0700 Subject: Add casts and consts to ease user conversion to C++. You would still need to run zlib2ansi on all of the *.c files. --- gzwrite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gzwrite.c') diff --git a/gzwrite.c b/gzwrite.c index 039225b..e8c5efd 100644 --- a/gzwrite.c +++ b/gzwrite.c @@ -19,7 +19,7 @@ local int gz_init(state) z_streamp strm = &(state->strm); /* allocate input buffer */ - state->in = malloc(state->want); + state->in = (unsigned char *)malloc(state->want); if (state->in == NULL) { gz_error(state, Z_MEM_ERROR, "out of memory"); return -1; @@ -28,7 +28,7 @@ local int gz_init(state) /* only need output buffer and deflate state if compressing */ if (!state->direct) { /* allocate output buffer */ - state->out = malloc(state->want); + state->out = (unsigned char *)malloc(state->want); if (state->out == NULL) { free(state->in); gz_error(state, Z_MEM_ERROR, "out of memory"); -- cgit v1.2.3-55-g6feb