cmd_fetch_pack(): return early if finish_connect() fails
[gitweb.git] / builtin / unpack-objects.c
index f63973c9143c4109a3d1e40df9ec66a32498fe00..2217d7b3ae57235fc25ac3f5bf8429588aa034c4 100644 (file)
@@ -90,7 +90,7 @@ static void use(int bytes)
 
 static void *get_data(unsigned long size)
 {
-       z_stream stream;
+       git_zstream stream;
        void *buf = xmalloc(size);
 
        memset(&stream, 0, sizeof(stream));
@@ -107,7 +107,7 @@ static void *get_data(unsigned long size)
                if (stream.total_out == size && ret == Z_STREAM_END)
                        break;
                if (ret != Z_OK) {
-                       error("inflate returned %d\n", ret);
+                       error("inflate returned %d", ret);
                        free(buf);
                        buf = NULL;
                        if (!recover)