Signed-off-by: Dmitry S. Dolzhenko <dmitrys.dolzhe...@yandex.ru> --- read-cache.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/read-cache.c b/read-cache.c index fb440b4..cbdf954 100644 --- a/read-cache.c +++ b/read-cache.c @@ -990,11 +990,7 @@ int add_index_entry(struct index_state *istate, struct cache_entry *ce, int opti } /* Make sure the array is big enough .. */ - if (istate->cache_nr == istate->cache_alloc) { - istate->cache_alloc = alloc_nr(istate->cache_alloc); - istate->cache = xrealloc(istate->cache, - istate->cache_alloc * sizeof(*istate->cache)); - } + ALLOC_GROW(istate->cache, istate->cache_nr + 1, istate->cache_alloc); /* Add it in.. */ istate->cache_nr++; -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html