Skip to content

Commit

Permalink
init_buffer(): Kill buf pointer
Browse files Browse the repository at this point in the history
We don't need it, it's possible to assign the block of memory to bufp

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Luiz Fernando N. Capitulino authored and Junio C Hamano committed Apr 25, 2007
1 parent 79dbbed commit 3e0a93a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions builtin-commit-tree.c
Expand Up @@ -16,9 +16,8 @@
*/
static void init_buffer(char **bufp, unsigned int *sizep)
{
char *buf = xmalloc(BLOCKING);
*bufp = xmalloc(BLOCKING);
*sizep = 0;
*bufp = buf;
}

static void add_buffer(char **bufp, unsigned int *sizep, const char *fmt, ...)
Expand Down

0 comments on commit 3e0a93a

Please sign in to comment.