From: Jonas Fonseca <fonseca@diku.dk> Date: Mon, 28 Aug 2006 00:26:07 +0000 (+0200) Subject: Use xcalloc instead of calloc X-Git-Tag: v1.4.3-rc1~171 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b3c952f8386cebe12fc95227866683bb1cec99a9;p=git Use xcalloc instead of calloc Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net> --- diff --git a/object-refs.c b/object-refs.c index b1b8065851..b0034e4b21 100644 --- a/object-refs.c +++ b/object-refs.c @@ -30,7 +30,7 @@ static void grow_refs_hash(void) int new_hash_size = (refs_hash_size + 1000) * 3 / 2; struct object_refs **new_hash; - new_hash = calloc(new_hash_size, sizeof(struct object_refs *)); + new_hash = xcalloc(new_hash_size, sizeof(struct object_refs *)); for (i = 0; i < refs_hash_size; i++) { struct object_refs *ref = refs_hash[i]; if (!ref) diff --git a/object.c b/object.c index 60bf16b902..92813001e2 100644 --- a/object.c +++ b/object.c @@ -73,7 +73,7 @@ static void grow_object_hash(void) int new_hash_size = obj_hash_size < 32 ? 32 : 2 * obj_hash_size; struct object **new_hash; - new_hash = calloc(new_hash_size, sizeof(struct object *)); + new_hash = xcalloc(new_hash_size, sizeof(struct object *)); for (i = 0; i < obj_hash_size; i++) { struct object *obj = obj_hash[i]; if (!obj)