git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] diff-delta: use realloc instead of xrealloc
@ 2007-05-29 19:08 Martin Koegler
  2007-05-29 23:51 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Koegler @ 2007-05-29 19:08 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Martin Koegler

Commit 83572c1a914d3f7a8dd66d954c11bbc665b7b923 changed many
realloc to xrealloc. This change was made in diff-delta.c too,
although the code can handle an out of memory failure.

This patch reverts this change in diff-delta.c.

Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
---
 diff-delta.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/diff-delta.c b/diff-delta.c
index 17757d2..faf96e4 100644
--- a/diff-delta.c
+++ b/diff-delta.c
@@ -388,7 +388,7 @@ create_delta(const struct delta_index *index,
 				outsize = max_size + MAX_OP_SIZE + 1;
 			if (max_size && outpos > max_size)
 				break;
-			out = xrealloc(out, outsize);
+			out = realloc(out, outsize);
 			if (!out) {
 				free(tmp);
 				return NULL;
-- 
1.5.2.846.g9a144

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-05-30  6:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-29 19:08 [PATCH] diff-delta: use realloc instead of xrealloc Martin Koegler
2007-05-29 23:51 ` Junio C Hamano
2007-05-30  2:57   ` Nicolas Pitre
2007-05-30  6:17     ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).