From 83572c1a914d3f7a8dd66d954c11bbc665b7b923 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Sat, 26 Aug 2006 16:16:18 +0200 Subject: Use xrealloc instead of realloc Change places that use realloc, without a proper error path, to instead use xrealloc. Drop an erroneous error path in the daemon code that used errno in the die message in favour of the simpler xrealloc. Signed-off-by: Jonas Fonseca Signed-off-by: Junio C Hamano --- sha1_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sha1_file.c') diff --git a/sha1_file.c b/sha1_file.c index dd9bcaabd0..46272b5916 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -1740,7 +1740,7 @@ int read_pipe(int fd, char** return_buf, unsigned long* return_size) off += iret; if (off == size) { size *= 2; - buf = realloc(buf, size); + buf = xrealloc(buf, size); } } } while (iret > 0); -- cgit v1.2.3