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

Re: [PATCH] builtin-name-rev.c: remove the remaining "typedef struct rev_name" from git.

From
Stephen Boyd <bebarino@gmail.com>
Date
Jan 30, 2010, 07:53 UTC
Message-ID
<4B63E56C.5000100@gmail.com>
In-Reply-To
<8678db190a73997c7bd757b9d78f0fa9e8721055.1264815015.git.tfransosi@gmail.com>
On 01/29/2010 05:32 PM, Thiago Farina wrote:
Show 6 quoted lines
> @@ -43,7 +43,7 @@ static void name_rev(struct commit *commit,
>   	}
>
>   	if (name == NULL) {
> -		name = xmalloc(sizeof(rev_name));
> +		name = xmalloc(sizeof(struct rev_name));

How about sizeof(*name) instead? This way we don't have to change it when the type changes again.

Previous: Thiago Farina
Message 2 of 2 in “builtin-name-rev.c: remove the remaining "typedef struct rev_name" from git.”
  1. builtin-name-rev.c: remove the remaining "typedef struct rev_name" from git.Thiago Farina, Jan 30, 2010
  2. Stephen BoydJan 30, 2010

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.