]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/zstd/zlibWrapper/gzlib.c
import 15.2.0 Octopus source
[ceph.git] / ceph / src / zstd / zlibWrapper / gzlib.c
index 8235cff4fda14e4799333122d9655370a89e5b10..3070dd8b4975c25b8a7f506d48b7cae0ffeaecf6 100644 (file)
@@ -111,7 +111,7 @@ local gzFile gz_open(path, fd, mode)
         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 */
@@ -266,7 +266,7 @@ local gzFile gz_open(path, fd, mode)
     gz_reset(state);
 
     /* return stream */
-    return (gzFile)state.file;
+    return state.file;
 }
 
 /* -- see zlib.h -- */