summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>2007-04-25 14:18:41 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-04-25 20:45:12 (GMT)
commit3e0a93a5bf9fe10453599a94af8191f421ee3b16 (patch)
tree2615581612d0c64c00e146c82bfedeecd7a5040f
parent79dbbedd78ae064be6bb8a0f61fd4872222e47dd (diff)
downloadgit-3e0a93a5bf9fe10453599a94af8191f421ee3b16.zip
git-3e0a93a5bf9fe10453599a94af8191f421ee3b16.tar.gz
git-3e0a93a5bf9fe10453599a94af8191f421ee3b16.tar.bz2
init_buffer(): Kill buf pointer
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>
-rw-r--r--builtin-commit-tree.c3
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, ...)