X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=http-push.c;h=b60fa8d2417c32cf72331e9869d4d3a3208e953f;hb=110cb41cbf7b7cfefdc1f9fab521f165dd1d5d00;hp=21c5289cde14d1a91c691f263c35c498d7beeaea;hpb=8c9e7947c2a76fb21bda11816c544d50e271156d;p=git.git diff --git a/http-push.c b/http-push.c index 21c5289c..b60fa8d2 100644 --- a/http-push.c +++ b/http-push.c @@ -622,7 +622,7 @@ static int refresh_lock(struct remote_lock *lock) return rc; } -static void check_locks() +static void check_locks(void) { struct remote_lock *lock = remote->locks; time_t current_time = time(NULL); @@ -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),