git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] diff-delta: use realloc instead of xrealloc

From
MKMartin Koegler <mkoegler@auto.tuwien.ac.at>
Date
May 29, 2007, 19:08 UTC
Message-ID
<1180465715346-git-send-email-mkoegler@auto.tuwien.ac.at>

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
Next: Junio C Hamano
Message 1 of 4 in “diff-delta: use realloc instead of xrealloc”
  1. diff-delta: use realloc instead of xreallocMartin Koegler, May 29, 2007
  2. Junio C HamanoMay 29, 2007
  3. Nicolas PitreMay 30, 2007
  4. Junio C HamanoMay 30, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.