Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
builtin/pack-objects.c: use ALLOC_GROW() in check_pbase_path()
author
Dmitry S. Dolzhenko
<dmitrys.dolzhenko@yandex.ru>
Mon, 3 Mar 2014 22:31:49 +0000
(
02:31
+0400)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 3 Mar 2014 22:44:11 +0000
(14:44 -0800)
Signed-off-by: Dmitry S. Dolzhenko <dmitrys.dolzhenko@yandex.ru>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/pack-objects.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
5f95c9f
)
diff --git
a/builtin/pack-objects.c
b/builtin/pack-objects.c
index 541667f1026d7ba62be8e029c31138d5661f65c7..b53bb5b25ccc6d5bb84e75a601f7fdadcba870ba 100644
(file)
--- a/
builtin/pack-objects.c
+++ b/
builtin/pack-objects.c
@@
-1156,12
+1156,9
@@
static int check_pbase_path(unsigned hash)
if (0 <= pos)
return 1;
pos = -pos - 1;
- if (done_pbase_paths_alloc <= done_pbase_paths_num) {
- done_pbase_paths_alloc = alloc_nr(done_pbase_paths_alloc);
- done_pbase_paths = xrealloc(done_pbase_paths,
- done_pbase_paths_alloc *
- sizeof(unsigned));
- }
+ ALLOC_GROW(done_pbase_paths,
+ done_pbase_paths_num + 1,
+ done_pbase_paths_alloc);
done_pbase_paths_num++;
if (pos < done_pbase_paths_num)
memmove(done_pbase_paths + pos + 1,