summaryrefslogtreecommitdiff
path: root/gzwrite.c
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2013-03-24 15:18:02 -0700
committerMark Adler <madler@alumni.caltech.edu>2013-03-24 16:09:08 -0700
commite9f0b78443884bfd88ead7235bcf5a6a1adae5cd (patch)
tree05561b485bbc8fe51a56634590d8eac025a247a5 /gzwrite.c
parent0aac8cf7c4da2572609d177657fb5f947bf38cd2 (diff)
downloadzlib-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.c4
1 files changed, 2 insertions, 2 deletions
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");