Re: [PATCH v2 04/10] diffcore-rename: extend cleanup_dir_rename_info()

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

 



On Thu, Feb 25 2021, Ævar Arnfjörð Bjarmason wrote:

>     -		partial_clear_dir_rename_count(&renames->dir_rename_count[i]);
>     -		if (!reinitialize)
>     -			strmap_clear(&renames->dir_rename_count[i], 1);
>     +		partial_clear_dir_rename_count(&renames->dir_rename_count[i],
>     +					       !reinitialize);
>     +		free(&renames->dir_rename_count[i]);
>      
>      		strmap_func(&renames->dir_renames[i], 0);
>      	}

That free() wasn't supposed to be in there, I was still experimenting
with whether partial_clear_dir_rename_count() should also free() this
itself.

But now that I notice I left that in there and in the meantime ran all
the tests, they all passed. So maybe this & the if/else in
diffcore_rename_extended() can lose its braces by just calling either
cleanup_dir_rename_info() or partial_clear_dir_rename_count(). I didn't
look in any detail, and if the free() v.s. FREE_AND_NULL() distinction
mattered here.




[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