summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-09-26 14:39:45 -0700
committerJunio C Hamano <gitster@pobox.com>2014-09-26 14:39:45 -0700
commit1c2ea2cdc0e8c4e5af942c51b234c5af527944f6 (patch)
tree26554b52f6dcd97e2194c4b0c32106b6a2b72f92 /object.c
parentb33000878a88b52816b97aeb88ba3677902ad277 (diff)
parent2756ca4347cbda05b16954cd7f445c216b935e76 (diff)
downloadgit-1c2ea2cdc0e8c4e5af942c51b234c5af527944f6.tar.gz
Merge branch 'rs/realloc-array'
Code cleanup. * rs/realloc-array: use REALLOC_ARRAY for changing the allocation size of arrays add macro REALLOC_ARRAY
Diffstat (limited to 'object.c')
-rw-r--r--object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/object.c b/object.c
index aedac243f0..ca9d790f4d 100644
--- a/object.c
+++ b/object.c
@@ -319,7 +319,7 @@ static void add_object_array_with_mode_context(struct object *obj, const char *n
if (nr >= alloc) {
alloc = (alloc + 32) * 2;
- objects = xrealloc(objects, alloc * sizeof(*objects));
+ REALLOC_ARRAY(objects, alloc);
array->alloc = alloc;
array->objects = objects;
}