Merge branch 'rs/realloc-array'
Code cleanup. * rs/realloc-array: use REALLOC_ARRAY for changing the allocation size of arrays add macro REALLOC_ARRAY
This commit is contained in:
2
object.c
2
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user