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-mv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'builtin-mv.c') diff --git a/builtin-mv.c b/builtin-mv.c index fd1e520981..4d21d88412 100644 --- a/builtin-mv.c +++ b/builtin-mv.c @@ -168,13 +168,13 @@ int cmd_mv(int argc, const char **argv, const char *prefix) int j, dst_len; if (last - first > 0) { - source = realloc(source, + source = xrealloc(source, (count + last - first) * sizeof(char *)); - destination = realloc(destination, + destination = xrealloc(destination, (count + last - first) * sizeof(char *)); - modes = realloc(modes, + modes = xrealloc(modes, (count + last - first) * sizeof(enum update_mode)); } -- cgit v1.2.3