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...