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
tag.c
View File

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