diff options
author | Mark Adler <madler@alumni.caltech.edu> | 2013-03-24 15:18:02 -0700 |
---|---|---|
committer | Mark Adler <madler@alumni.caltech.edu> | 2013-03-24 16:09:08 -0700 |
commit | e9f0b78443884bfd88ead7235bcf5a6a1adae5cd (patch) | |
tree | 05561b485bbc8fe51a56634590d8eac025a247a5 /gzwrite.c | |
parent | 0aac8cf7c4da2572609d177657fb5f947bf38cd2 (diff) | |
download | zlib-e9f0b78443884bfd88ead7235bcf5a6a1adae5cd.tar.gz |
Add casts and consts to ease user conversion to C++.
You would still need to run zlib2ansi on all of the *.c files.
Diffstat (limited to 'gzwrite.c')
-rw-r--r-- | gzwrite.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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"); |