# [PATCH 5/5] init_buffer(): Kill buf pointer

1 messages from 2007-04-25 to 2007-04-25. Participants: Luiz Fernando N. Capitulino.
Thread: https://gitlist.dev/t/7837

## Luiz Fernando N. Capitulino, 2007-04-25 14:18

Subject: [PATCH 5/5] init_buffer(): Kill buf pointer
Message-ID: <20070425111841.2c491281@localhost>
URL: https://gitlist.dev/e/20070425111841.2c491281%40localhost

```
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>
---
 builtin-commit-tree.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/builtin-commit-tree.c b/builtin-commit-tree.c
index 4a8d8d8..ccbcbe3 100644
--- a/builtin-commit-tree.c
+++ b/builtin-commit-tree.c
@@ -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, ...)
-- 
1.5.1.1.320.g1cf2

```
