{"thread":{"id":"5417","subject":"[PATCH] Use xcalloc instead of calloc","startedAt":"2006-08-28T00:26:07Z","lastAt":"2006-08-28T00:26:07Z","messageCount":1,"participants":["Jonas Fonseca"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"26019","messageId":"20060828002607.GD20904@diku.dk","threadId":"5417","inReplyTo":null,"subject":"[PATCH] Use xcalloc instead of calloc","fromName":"Jonas Fonseca","fromEmail":"fonseca@diku.dk","sentAt":"2006-08-28T00:26:07Z","receivedAt":"2006-08-28T00:26:07Z","isPatch":true,"sender":{"key":"fonseca@diku.dk","avatar":"https://gravatar.com/avatar/f82f3ad698717c51873b020c750a92438c820a24056dc39fe4d07baa10a92264?d=mp&s=160"},"body":"Signed-off-by: Jonas Fonseca <fonseca@diku.dk>\n---\n object-refs.c |    2 +-\n object.c      |    2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/object-refs.c b/object-refs.c\nindex b1b8065..b0034e4 100644\n--- a/object-refs.c\n+++ b/object-refs.c\n@@ -30,7 +30,7 @@ static void grow_refs_hash(void)\n \tint new_hash_size = (refs_hash_size + 1000) * 3 / 2;\n \tstruct object_refs **new_hash;\n \n-\tnew_hash = calloc(new_hash_size, sizeof(struct object_refs *));\n+\tnew_hash = xcalloc(new_hash_size, sizeof(struct object_refs *));\n \tfor (i = 0; i < refs_hash_size; i++) {\n \t\tstruct object_refs *ref = refs_hash[i];\n \t\tif (!ref)\ndiff --git a/object.c b/object.c\nindex 60bf16b..9281300 100644\n--- a/object.c\n+++ b/object.c\n@@ -73,7 +73,7 @@ static void grow_object_hash(void)\n \tint new_hash_size = obj_hash_size < 32 ? 32 : 2 * obj_hash_size;\n \tstruct object **new_hash;\n \n-\tnew_hash = calloc(new_hash_size, sizeof(struct object *));\n+\tnew_hash = xcalloc(new_hash_size, sizeof(struct object *));\n \tfor (i = 0; i < obj_hash_size; i++) {\n \t\tstruct object *obj = obj_hash[i];\n \t\tif (!obj)\n-- \n1.4.2.g2f76-dirty\n\n-- \nJonas Fonseca\n"}]}