init_buffer(): Kill buf pointer
authorLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Wed, 25 Apr 2007 14:18:41 +0000 (11:18 -0300)
committerJunio C Hamano <junkio@cox.net>
Wed, 25 Apr 2007 20:45:12 +0000 (13:45 -0700)
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>
builtin-commit-tree.c

index 4a8d8d8b674c6f272243a074030af289403eadde..ccbcbe30dab634d9ff393f1e849c18388b9d53d4 100644 (file)
@@ -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, ...)