diff options
author | René Scharfe <l.s.r@web.de> | 2014-09-16 20:56:57 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-09-18 09:13:42 -0700 |
commit | 2756ca4347cbda05b16954cd7f445c216b935e76 (patch) | |
tree | 70afb2d44557fd05bbc0707c190c6026ab6135fd /string-list.c | |
parent | 3ac22f82edec108986b2627fcd6f2a8039617a23 (diff) | |
download | git-2756ca4347cbda05b16954cd7f445c216b935e76.tar.gz |
use REALLOC_ARRAY for changing the allocation size of arraysrs/realloc-array
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'string-list.c')
-rw-r--r-- | string-list.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/string-list.c b/string-list.c index db38b62b46..c5aa0765e8 100644 --- a/string-list.c +++ b/string-list.c @@ -43,8 +43,7 @@ static int add_entry(int insert_at, struct string_list *list, const char *string if (list->nr + 1 >= list->alloc) { list->alloc += 32; - list->items = xrealloc(list->items, list->alloc - * sizeof(struct string_list_item)); + REALLOC_ARRAY(list->items, list->alloc); } if (index < list->nr) memmove(list->items + index + 1, list->items + index, |