Re: [PATCH v3 2/8] Add delta-islands.{c,h}

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

 



On Sat, Aug 11, 2018 at 4:12 PM, Jeff King <peff@xxxxxxxx> wrote:
> On Sat, Aug 11, 2018 at 12:32:32PM +0200, Christian Couder wrote:
>
>> Ok, I have made the following changes in the branch I will send next.
>>
>> diff --git a/delta-islands.c b/delta-islands.c
>> index 92137f2eca..22e4360810 100644
>> --- a/delta-islands.c
>> +++ b/delta-islands.c
>> @@ -322,8 +322,7 @@ static int island_config_callback(const char *k,
>> const char *v, void *cb)
>>
>>                 if (island_regexes_nr >= island_regexes_alloc) {
>>                         island_regexes_alloc = (island_regexes_alloc + 8) * 2;
>> -                       island_regexes = xrealloc(island_regexes,
>> -                                       island_regexes_alloc * sizeof(regex_t));
>> +                       REALLOC_ARRAY(island_regexes, island_regexes_alloc);
>>                 }
>
> I think this whole block could actually be ALLOC_GROW().

Yeah, thanks! The whole block will be replaced with the following in
the next reroll:

ALLOC_GROW(island_regexes, island_regexes_nr + 1, island_regexes_alloc);



[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]

  Powered by Linux