[PATCH 0/2] pack-objects: use ALLOC_GROW in place of manual growth
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Oct 8, 2010, 16:45 UTC
- Message-ID
- <20101008164536.GB9212@burratino>
- In-Reply-To
- <20101008074320.GB4671@burratino>
Jonathan Nieder wrote:
> - done_pbase_paths_num++; > + ALLOC_GROW(done_pbase_paths, > + ++done_pbase_paths_num, > + done_pbase_paths_alloc);
Junio noticed that this makes done_pbase_paths_num grow by 3 rather than by 1 as intended. Sorry.
Patch 1 corrects some documentation that could lead one astray. Patch 2 is a corrected patch that uses ALLOC_GROW correctly (I hope).
Jonathan Nieder (2): Documentation: No argument of ALLOC_GROW cannot have side-effects pack-objects: use ALLOC_GROW
builtin/pack-objects.c | 15 ++++----------- cache.h | 2 +- 2 files changed, 5 insertions(+), 12 deletions(-)
-- 1.7.2.3