提交 28cc4ab4 编写于 作者: Y Yakov Lerner 提交者: Junio C Hamano

read-cache.c: use xcalloc() not calloc()

Elsewhere we use xcalloc(); we should consistently do so.
Signed-off-by: NYakov Lerner <iler.ml@gmail.com>
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 dbd0f7d3
......@@ -552,7 +552,7 @@ int read_cache(void)
active_nr = ntohl(hdr->hdr_entries);
active_alloc = alloc_nr(active_nr);
active_cache = calloc(active_alloc, sizeof(struct cache_entry *));
active_cache = xcalloc(active_alloc, sizeof(struct cache_entry *));
offset = sizeof(*hdr);
for (i = 0; i < active_nr; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册