Signed-off-by: Dmitry S. Dolzhenko <dmitrys.dolzhe...@yandex.ru>
---
 dir.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/dir.c b/dir.c
index 98bb50f..4ae38e4 100644
--- a/dir.c
+++ b/dir.c
@@ -1341,10 +1341,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)
                        break;
-- 
1.8.5.3
--
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

Reply via email to