Re: [PATCH v2 2/4] t-reftable-readwrite: use free_names() instead of a for loop

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

 



Chandra Pratap <chandrapratap3519@xxxxxxxxx> writes:

> On Sat, 10 Aug 2024 at 00:27, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>>
>> Chandra Pratap <chandrapratap3519@xxxxxxxxx> writes:
>>
>> > free_names() as defined by reftable/basics.{c,h} frees a NULL
>> > terminated array of malloced strings along with the array itself.
>> > Use this function instead of a for loop to free such an array.
>> ...
> This test is supposed to focus on reftable's read-write functionalities
> so it makes sense to explicitly #include only those headers that
> are directly responsible for those functionalities, namely 'reader.h',
> 'blocksource.h' and 'reftable-writer.h'. 'reftable-error.h' is thrown in
> there as well because some tests need to explicitly mention the
> various error codes and it doesn't make sense to rely on it being
> #included by others.

I think we are on the same page.  The code explicitly exercises
free_names() after this step, and that is exactly why I found it odd
to rely on basics.h happen to be included by some other header
file(s) we explicitly include.

Thanks.




[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