diff options
author | Peter Eriksen <s022018@student.dtu.dk> | 2006-04-03 19:30:46 +0100 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-04-04 00:11:19 -0700 |
commit | 90321c106ca6e36c0e884ca677c9a52dea47bdde (patch) | |
tree | c574dde6987912d2197af80a5f7f8827cde263cc /http-push.c | |
parent | 8e4402592574d630cdb5ab4f55a1b7131802ff72 (diff) | |
download | git-90321c106ca6e36c0e884ca677c9a52dea47bdde.tar.gz |
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.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/http-push.c b/http-push.c index ba7d9de234..b60fa8d241 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), |