git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] clone: plug a miniscule leak

From
Philip Oakley <philipoakley@iee.email>
Date
May 2, 2022, 20:39 UTC
Message-ID
<225433fb-d5ae-fc92-8d50-03162e75780e@iee.email>
In-Reply-To
<xmqqzgjzzwnd.fsf@gitster.g>

CC'ing Elia as per the mention. Thread https://lore.kernel.org/git/xmqqzgjzzwnd.fsf@gitster.g/t/#u.

On 02/05/2022 18:12, Junio C Hamano wrote:  <xmqqzgjzzwnd.fsf@gitster.g>
Show 19 quoted lines
> Derrick Stolee <derrickstolee@github.com> writes:
>
>>> -	if (option_origin != NULL)
>> This technically wouldn't hit your rule, since "E" isn't just the
>> variable name, as we typically do with our style. Is that something
>> that Coccinelle automatically simplifies?
>>
>>> +	if (option_origin != NULL) {
>> Do you want to take this opportunity to drop the "!= NULL" here?
>>
>>> +		free(remote_name);
>>>  		remote_name = xstrdup(option_origin);
>>> +	}
>>>>  	if (remote_name == NULL)
>> Or do you want to keep similar style from the surrounding code?
> I think that it is better to leave that particular clean-up to
> the equals-null.cocci topic started by Elia; I know having them
> separate would cause a merge conflict, but even if I change them
> here, it will result in the same merge conflict anyway ;-)
Previous: Junio C Hamano
Message 4 of 4 in “clone: plug a miniscule leak”
  1. clone: plug a miniscule leakJunio C Hamano, May 1, 2022
  2. Derrick StoleeMay 2, 2022
  3. Junio C HamanoMay 2, 2022
  4. Philip OakleyMay 2, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.