read-cache.c: use xcalloc() not calloc()
Elsewhere we use xcalloc(); we should consistently do so. Signed-off-by: Yakov Lerner <iler.ml@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
parent
dbd0f7d322
commit
28cc4ab422
@ -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++) {
|
||||
|
Loading…
Reference in New Issue
Block a user