Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
dir.c: use ALLOC_GROW() in create_simplify()
author
Dmitry S. Dolzhenko
<dmitrys.dolzhenko@yandex.ru>
Mon, 3 Mar 2014 22:31:58 +0000
(
02:31
+0400)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 3 Mar 2014 22:54:29 +0000
(14:54 -0800)
Signed-off-by: Dmitry S. Dolzhenko <dmitrys.dolzhenko@yandex.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
dir.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
6647cc2
)
diff --git
a/dir.c
b/dir.c
index b35b6330f850f610b582b189d7e4d6a9ba4495db..f6c647006b0a2cad4d2f4cb56786e50950007960 100644
(file)
--- a/
dir.c
+++ b/
dir.c
@@
-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;