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

View File

@@ -1008,8 +1008,7 @@ static int fetch_indices(void)
struct active_request_slot *slot;
struct slot_results results;
data = xmalloc(4096);
memset(data, 0, 4096);
data = xcalloc(1, 4096);
buffer.size = 4096;
buffer.posn = 0;
buffer.buffer = data;
@@ -2042,8 +2041,7 @@ static void update_remote_info_refs(struct remote_lock *lock)
char *if_header;
struct curl_slist *dav_headers = NULL;
buffer.buffer = xmalloc(4096);
memset(buffer.buffer, 0, 4096);
buffer.buffer = xcalloc(1, 4096);
buffer.size = 4096;
buffer.posn = 0;
remote_ls("refs/", (PROCESS_FILES | RECURSIVE),