@matheusbsbs / matheus-bagliano / commits / b3c952f838
Fork 0

Use xcalloc instead of calloc

Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>

Jonas Fonseca committed Aug 28, 2006 at 02:26 UTC b3c952f8386cebe12fc95227866683bb1cec99a9
2 files changed +2 -2
object-refs.c
+1 -1
@@ -30,7 +30,7 @@ static void grow_refs_hash(void)
30 int new_hash_size = (refs_hash_size + 1000) * 3 / 2;
31 struct object_refs **new_hash;
32
33 - new_hash = calloc(new_hash_size, sizeof(struct object_refs *));
33 + new_hash = xcalloc(new_hash_size, sizeof(struct object_refs *));
34 for (i = 0; i < refs_hash_size; i++) {
35 struct object_refs *ref = refs_hash[i];
36 if (!ref)
object.c
+1 -1
@@ -73,7 +73,7 @@ static void grow_object_hash(void)
73 int new_hash_size = obj_hash_size < 32 ? 32 : 2 * obj_hash_size;
74 struct object **new_hash;
75
76 - new_hash = calloc(new_hash_size, sizeof(struct object *));
76 + new_hash = xcalloc(new_hash_size, sizeof(struct object *));
77 for (i = 0; i < obj_hash_size; i++) {
78 struct object *obj = obj_hash[i];
79 if (!obj)