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>
maint
Yakov Lerner 2006-05-09 16:14:00 +00:00 committed by Junio C Hamano
parent dbd0f7d322
commit 28cc4ab422
1 changed files with 1 additions and 1 deletions

View File

@ -552,7 +552,7 @@ int read_cache(void)


active_nr = ntohl(hdr->hdr_entries); active_nr = ntohl(hdr->hdr_entries);
active_alloc = alloc_nr(active_nr); 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); offset = sizeof(*hdr);
for (i = 0; i < active_nr; i++) { for (i = 0; i < active_nr; i++) {