Merge branch 'rt/for-each-ref-spell-tcl-as-Tcl'
[gitweb.git] / pack-bitmap.c
index 9f8b9098113dc189217c3f133857cff34645173d..6a818419ca46f8d66adbeb0027da49e6bab1bfa3 100644 (file)
@@ -408,10 +408,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;