diff options
author | Dmitry S. Dolzhenko <dmitrys.dolzhenko@yandex.ru> | 2014-03-04 02:31:58 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-03-03 14:54:29 -0800 |
commit | 9af49f822bc1e4f00b356e052f666ae7714a0399 (patch) | |
tree | 4c830c2d38e0b9e121c672cfcd8b27e7a91caeca /dir.c | |
parent | 6647cc2626b34493e937db13e6590ee8aad0c109 (diff) | |
download | git-9af49f822bc1e4f00b356e052f666ae7714a0399.tar.gz |
dir.c: use ALLOC_GROW() in create_simplify()
Signed-off-by: Dmitry S. Dolzhenko <dmitrys.dolzhenko@yandex.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.c')
-rw-r--r-- | dir.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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) break; |