Merge branch 'jh/fetch-head-update'
[gitweb.git] / builtin / unpack-objects.c
index 685566e0b5e458c510fdf989744d63dda29e28f0..14e04e6795bd514fb1fec506073d8a9a71668cfa 100644 (file)
@@ -83,14 +83,14 @@ static void use(int bytes)
        offset += bytes;
 
        /* make sure off_t is sufficiently large not to wrap */
-       if (consumed_bytes > consumed_bytes + bytes)
+       if (signed_add_overflows(consumed_bytes, bytes))
                die("pack too large for current definition of off_t");
        consumed_bytes += bytes;
 }
 
 static void *get_data(unsigned long size)
 {
-       z_stream stream;
+       git_zstream stream;
        void *buf = xmalloc(size);
 
        memset(&stream, 0, sizeof(stream));