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 --- builtin-fmt-merge-msg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'builtin-fmt-merge-msg.c') diff --git a/builtin-fmt-merge-msg.c b/builtin-fmt-merge-msg.c index 28b5dfd05..a5ed8dbba 100644 --- a/builtin-fmt-merge-msg.c +++ b/builtin-fmt-merge-msg.c @@ -27,8 +27,8 @@ static void append_to_list(struct list *list, char *value, void *payload) { if (list->nr == list->alloc) { list->alloc += 32; - list->list = realloc(list->list, sizeof(char *) * list->alloc); - list->payload = realloc(list->payload, + list->list = xrealloc(list->list, sizeof(char *) * list->alloc); + list->payload = xrealloc(list->payload, sizeof(char *) * list->alloc); } list->payload[list->nr] = payload; -- cgit v1.2.1