diff options
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) | |||
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"); |