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
Thomas Harning <harningt@gmail.com>
Date
Jun 6, 2008, 19:46 UTC
Message-ID
<D11671CD-8F0B-4572-A988-EC6BC6B38A46@gmail.com>
In-Reply-To
<Pine.LNX.4.64.0806061330180.18454@xenau.zenez.com>
On Jun 6, 2008, at 3:34 PM, Boyd Lynn Gerber wrote:
Show 16 quoted lines
>
> #ifdef SNPRINTF_RETURNS_BOGUS
> #define snprintf git_snprintf
> 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 );
> 		struct throughput *tp = progress->throughput;

Hrm... malloc w/o free... perhaps you should use a something like alloca /IFF/ C99/gnu isn't available for the dynamic buffer allocation...

Previous: Boyd Lynn GerberNext: Daniel Barkalow
Message 22 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.