[PATCH 0/2] pack-objects: use ALLOC_GROW in place of manual growth

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]