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

Re: [PATCH] This patch is to allow 12 different OS's to compile and run git.

From
JMJeremy Maitin-Shepard <jbms@cmu.edu>
Date
Jun 6, 2008, 19:39 UTC
Message-ID
<87bq2ez72u.fsf@jeremyms.com>
In-Reply-To
<Pine.LNX.4.64.0806061330180.18454@xenau.zenez.com>
Boyd Lynn Gerber <gerberb@zenez.com> writes:
[snip]
Show 12 quoted lines
> diff --git a/progress.c b/progress.c
> index d19f80c..11a0841 100644
> --- a/progress.c
> +++ b/progress.c
> @@ -241,7 +241,8 @@ void stop_progress_msg(struct progress **p_progress, const
> char *msg)
>  	*p_progress = NULL;
>  	if (progress->last_value != -1) {
>  		/* Force the last update */
> -		char buf[strlen(msg) + 5];
> +		/* char buf[strlen(msg) + 5]; */
> +		char *buf = malloc (strlen(msg) + 5 );

This change will result in the allocated memory being leaked, which is probably not correct. Perhaps change it to alloca instead.

-- 
Jeremy Maitin-Shepard
Previous: Boyd Lynn GerberNext: Boyd Lynn Gerber
Message 2 of 24 in “This patch is to allow 12 different OS's to compile and run git.”
  1. This patch is to allow 12 different OS's to compile and run git.Boyd Lynn Gerber, Jun 6, 2008
  2. Jeremy Maitin-ShepardJun 6, 2008
  3. Boyd Lynn GerberJun 6, 2008
  4. Stephan BeyerJun 6, 2008
  5. Linus TorvaldsJun 6, 2008
  6. Boyd Lynn GerberJun 6, 2008
  7. Brandon CaseyJun 6, 2008
  8. Junio C HamanoJun 6, 2008
  9. Boyd Lynn GerberJun 6, 2008
  10. Boyd Lynn GerberJun 7, 2008
  11. Daniel BarkalowJun 7, 2008
  12. Boyd Lynn GerberJun 7, 2008
  13. Junio C HamanoJun 7, 2008
  14. Boyd Lynn GerberJun 7, 2008
  15. Daniel BarkalowJun 7, 2008
  16. Boyd Lynn GerberJun 8, 2008
  17. Junio C HamanoJun 8, 2008
  18. progress.c: avoid use of dynamic-sized arrayBoyd Lynn Gerber, Jun 8, 2008
  19. Port to 12 other Platforms.Boyd Lynn Gerber, Jun 8, 2008
  20. Boyd Lynn GerberJun 8, 2008
  21. Boyd Lynn GerberJun 8, 2008
  22. Thomas HarningJun 6, 2008
  23. Daniel BarkalowJun 6, 2008
  24. Boyd Lynn GerberJun 6, 2008

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.