summaryrefslogtreecommitdiff
path: root/http-push.c
diff options
context:
space:
mode:
authorPeter Eriksen <s022018@student.dtu.dk>2006-04-03 18:30:46 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-04-04 07:11:19 (GMT)
commit90321c106ca6e36c0e884ca677c9a52dea47bdde (patch)
treec574dde6987912d2197af80a5f7f8827cde263cc /http-push.c
parent8e4402592574d630cdb5ab4f55a1b7131802ff72 (diff)
downloadgit-90321c106ca6e36c0e884ca677c9a52dea47bdde.zip
git-90321c106ca6e36c0e884ca677c9a52dea47bdde.tar.gz
git-90321c106ca6e36c0e884ca677c9a52dea47bdde.tar.bz2
Replace xmalloc+memset(0) with xcalloc.
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'http-push.c')
-rw-r--r--http-push.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/http-push.c b/http-push.c
index ba7d9de..b60fa8d 100644
--- a/http-push.c
+++ b/http-push.c
@@ -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),