My Various Git Projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6647cc2
)
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
diff --git
a/dir.c
b/dir.c
index
b35b633
..
f6c6470
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;