]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/receive-pack.c
use CALLOC_ARRAY
[thirdparty/git.git] / builtin / receive-pack.c
index d26040c477924826a4d24fe4efdded74278c8684..51c8c40fab3bb54e51293295503a792685f4a46b 100644 (file)
@@ -358,7 +358,7 @@ static void proc_receive_ref_append(const char *prefix)
        char *p;
        int len;
 
-       ref_pattern = xcalloc(1, sizeof(struct proc_receive_ref));
+       CALLOC_ARRAY(ref_pattern, 1);
        p = strchr(prefix, ':');
        if (p) {
                while (prefix < p) {
@@ -1024,7 +1024,7 @@ static int read_proc_receive_report(struct packet_reader *reader,
                        }
                        if (new_report) {
                                if (!hint->report) {
-                                       hint->report = xcalloc(1, sizeof(struct ref_push_report));
+                                       CALLOC_ARRAY(hint->report, 1);
                                        report = hint->report;
                                } else {
                                        report = hint->report;