Replace xmalloc+memset(0) with xcalloc.

Signed-off-by: Peter Eriksen <s022018@student.dtu.dk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Peter Eriksen
2006-04-03 19:30:46 +01:00
committed by Junio C Hamano
parent 8e44025925
commit 90321c106c
10 changed files with 18 additions and 37 deletions

3
blob.c
View File

@ -8,8 +8,7 @@ struct blob *lookup_blob(const unsigned char *sha1)
{
struct object *obj = lookup_object(sha1);
if (!obj) {
struct blob *ret = xmalloc(sizeof(struct blob));
memset(ret, 0, sizeof(struct blob));
struct blob *ret = xcalloc(1, sizeof(struct blob));
created_object(sha1, &ret->object);
ret->object.type = blob_type;
return ret;