Commit 9af49f82 authored by Dmitry S. Dolzhenko's avatar Dmitry S. Dolzhenko Committed by Junio C Hamano

dir.c: use ALLOC_GROW() in create_simplify()

Signed-off-by: default avatarDmitry S. Dolzhenko <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent 6647cc26
......@@ -1329,10 +1329,7 @@ static struct path_simplify *create_simplify(const char **pathspec)
for (nr = 0 ; ; nr++) {
const char *match;
if (nr >= alloc) {
alloc = alloc_nr(alloc);
simplify = xrealloc(simplify, alloc * sizeof(*simplify));
ALLOC_GROW(simplify, nr + 1, alloc);
match = *pathspec++;
if (!match)
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment