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:
committed by
Junio C Hamano
parent
143c89b003
commit
28f7581806
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user