am, rebase--merge: do not overlook --skip'ed commits with post-rewrite
[gitweb.git] / pack-objects.h
index feb6a6a05edba0772f4cfd8b4529bce9d3858751..dc869f26c2b753593a875f275d896933b7723b31 100644 (file)
@@ -412,7 +412,7 @@ static inline void oe_set_tree_depth(struct packing_data *pack,
                                     unsigned int tree_depth)
 {
        if (!pack->tree_depth)
-               ALLOC_ARRAY(pack->tree_depth, pack->nr_objects);
+               CALLOC_ARRAY(pack->tree_depth, pack->nr_alloc);
        pack->tree_depth[e - pack->objects] = tree_depth;
 }
 
@@ -429,7 +429,7 @@ static inline void oe_set_layer(struct packing_data *pack,
                                unsigned char layer)
 {
        if (!pack->layer)
-               ALLOC_ARRAY(pack->layer, pack->nr_objects);
+               CALLOC_ARRAY(pack->layer, pack->nr_alloc);
        pack->layer[e - pack->objects] = layer;
 }