summaryrefslogtreecommitdiff
path: root/builtin-mv.c
diff options
context:
space:
mode:
authorJonas Fonseca <fonseca@diku.dk>2006-08-26 14:16:18 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-08-27 00:54:06 (GMT)
commit83572c1a914d3f7a8dd66d954c11bbc665b7b923 (patch)
treebae4dc57d36b83c835253498dfdabd29d4dec66e /builtin-mv.c
parent095c424d08d96a5f9ee3ca53ae952e92c5cff99b (diff)
downloadgit-83572c1a914d3f7a8dd66d954c11bbc665b7b923.zip
git-83572c1a914d3f7a8dd66d954c11bbc665b7b923.tar.gz
git-83572c1a914d3f7a8dd66d954c11bbc665b7b923.tar.bz2
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 <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-mv.c')
-rw-r--r--builtin-mv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin-mv.c b/builtin-mv.c
index fd1e520..4d21d88 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));
}