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

Re: [ANNOUNCE] GIT 1.0.7

From
HAH. Peter Anvin <hpa@zytor.com>
Date
Jan 7, 2006, 21:30 UTC
Message-ID
<43C032F4.9030104@zytor.com>
In-Reply-To
<7vlkxreo9e.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 17 quoted lines
> "H. Peter Anvin" <hpa@zytor.com> writes:
> 
> 
>>Any reason to not just do:
>>
>> 	struct frotz {
>> 		int xyzzy;
>> 		char nitfol[1]; /* more */
>> 	};
>>
>>... which should work on all compilers?
> 
> Laziness, especially to avoid having to deal with comments like
> "your xmalloc(sizeof(struct frotz) + strlen(nitfol) + 1) should be
> xmalloc(sizeof(struct frotz) + strlen(nitfol)), because you
> have already one byte for nitfol element."
> 

In the case of strings, that's probably a blessing (already accounted for the null byte).

	-hpa
Previous: Junio C Hamano
Message 11 of 11 in “[ANNOUNCE] GIT 1.0.7”
  1. Junio C HamanoJan 7, 2006
  2. YOSHIFUJI Hideaki / 吉藤英明Jan 7, 2006
  3. David S. MillerJan 7, 2006
  4. YOSHIFUJI Hideaki / 吉藤英明Jan 7, 2006
  5. Junio C HamanoJan 7, 2006
  6. Junio C HamanoJan 7, 2006
  7. Sergey VlasovJan 7, 2006
  8. Junio C HamanoJan 7, 2006
  9. H. Peter AnvinJan 7, 2006
  10. Junio C HamanoJan 7, 2006
  11. H. Peter AnvinJan 7, 2006

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.