return NULL;
/* allocate gzFile structure to return */
- state = (gz_statep)(gz_state*)malloc(sizeof(gz_state));
+ state.state = (gz_state*)malloc(sizeof(gz_state));
if (state.state == NULL)
return NULL;
state.state->size = 0; /* no buffers allocated yet */
gz_reset(state);
/* return stream */
- return (gzFile)state.file;
+ return state.file;
}
/* -- see zlib.h -- */