]> git.ipfire.org Git - thirdparty/git.git/blobdiff - progress.c
use CALLOC_ARRAY
[thirdparty/git.git] / progress.c
index 31014e6fca0512d16b0fbcc35c7fbfd43426e5c8..680c6a8bf93b514a7b82510c475984ca32067eb7 100644 (file)
@@ -196,7 +196,7 @@ void display_throughput(struct progress *progress, uint64_t total)
        now_ns = progress_getnanotime(progress);
 
        if (!tp) {
-               progress->throughput = tp = xcalloc(1, sizeof(*tp));
+               progress->throughput = CALLOC_ARRAY(tp, 1);
                tp->prev_total = tp->curr_total = total;
                tp->prev_ns = now_ns;
                strbuf_init(&tp->display, 0);