transport: simplify duplicating a substring in transport_get() using xmemdupz()
[gitweb.git] / pack-bitmap.c
index 91e41015316e8d5c166cdee92c453ec23a483dab..a1f3c0d34f8958c08310aa9fc77e764885b76008 100644 (file)
@@ -400,10 +400,8 @@ static int ext_index_add_object(struct object *object, const char *name)
        if (hash_ret > 0) {
                if (eindex->count >= eindex->alloc) {
                        eindex->alloc = (eindex->alloc + 16) * 3 / 2;
-                       eindex->objects = xrealloc(eindex->objects,
-                               eindex->alloc * sizeof(struct object *));
-                       eindex->hashes = xrealloc(eindex->hashes,
-                               eindex->alloc * sizeof(uint32_t));
+                       REALLOC_ARRAY(eindex->objects, eindex->alloc);
+                       REALLOC_ARRAY(eindex->hashes, eindex->alloc);
                }
 
                bitmap_pos = eindex->count;