Substitute 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-07-25 09:30:18 +02:00
committed by Junio C Hamano
parent 143c89b003
commit 28f7581806
3 changed files with 3 additions and 6 deletions

View File

@ -639,8 +639,7 @@ static int show_patch_diff(struct combine_diff_path *elem, int num_parent,
/* deleted file */
result_size = 0;
elem->mode = 0;
result = xmalloc(1);
result[0] = 0;
result = xcalloc(1, 1);
}
if (0 <= fd)
close(fd);