All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5/5] init_buffer(): Kill buf pointer
@ 2007-04-25 14:18 Luiz Fernando N. Capitulino
  0 siblings, 0 replies; only message in thread
From: Luiz Fernando N. Capitulino @ 2007-04-25 14:18 UTC (permalink / raw)
  To: junkio; +Cc: Git List

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2007-04-25 14:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-25 14:18 [PATCH 5/5] init_buffer(): Kill buf pointer Luiz Fernando N. Capitulino

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.