From 2756ca4347cbda05b16954cd7f445c216b935e76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Tue, 16 Sep 2014 20:56:57 +0200 Subject: use REALLOC_ARRAY for changing the allocation size of arrays Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- attr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'attr.c') diff --git a/attr.c b/attr.c index 734222dc45..cd5469770a 100644 --- a/attr.c +++ b/attr.c @@ -97,8 +97,7 @@ static struct git_attr *git_attr_internal(const char *name, int len) a->attr_nr = attr_nr++; git_attr_hash[pos] = a; - check_all_attr = xrealloc(check_all_attr, - sizeof(*check_all_attr) * attr_nr); + REALLOC_ARRAY(check_all_attr, attr_nr); check_all_attr[a->attr_nr].attr = a; check_all_attr[a->attr_nr].value = ATTR__UNKNOWN; return a; -- cgit v1.2.3