aboutsummaryrefslogtreecommitdiff
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
zlib-e9f0b78443884bfd88ead7235bcf5a6a1adae5cd.tar.bz2
zlib-e9f0b78443884bfd88ead7235bcf5a6a1adae5cd.zip
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)
19 z_streamp strm = &(state->strm); 19 z_streamp strm = &(state->strm);
20 20
21 /* allocate input buffer */ 21 /* allocate input buffer */
22 state->in = malloc(state->want); 22 state->in = (unsigned char *)malloc(state->want);
23 if (state->in == NULL) { 23 if (state->in == NULL) {
24 gz_error(state, Z_MEM_ERROR, "out of memory"); 24 gz_error(state, Z_MEM_ERROR, "out of memory");
25 return -1; 25 return -1;
@@ -28,7 +28,7 @@ local int gz_init(state)
28 /* only need output buffer and deflate state if compressing */ 28 /* only need output buffer and deflate state if compressing */
29 if (!state->direct) { 29 if (!state->direct) {
30 /* allocate output buffer */ 30 /* allocate output buffer */
31 state->out = malloc(state->want); 31 state->out = (unsigned char *)malloc(state->want);
32 if (state->out == NULL) { 32 if (state->out == NULL) {
33 free(state->in); 33 free(state->in);
34 gz_error(state, Z_MEM_ERROR, "out of memory"); 34 gz_error(state, Z_MEM_ERROR, "out of memory");