Skip to content

Commit c4aa316

Browse files
felipecgitster
authored andcommitted
read-cache: trivial style cleanups
Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 582eb85 commit c4aa316

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

read-cache.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,7 @@ int add_index_entry(struct index_state *istate, struct cache_entry *ce, int opti
975975
if (istate->cache_nr == istate->cache_alloc) {
976976
istate->cache_alloc = alloc_nr(istate->cache_alloc);
977977
istate->cache = xrealloc(istate->cache,
978-
istate->cache_alloc * sizeof(struct cache_entry *));
978+
istate->cache_alloc * sizeof(*istate->cache));
979979
}
980980

981981
/* Add it in.. */
@@ -1445,7 +1445,7 @@ int read_index_from(struct index_state *istate, const char *path)
14451445
istate->version = ntohl(hdr->hdr_version);
14461446
istate->cache_nr = ntohl(hdr->hdr_entries);
14471447
istate->cache_alloc = alloc_nr(istate->cache_nr);
1448-
istate->cache = xcalloc(istate->cache_alloc, sizeof(struct cache_entry *));
1448+
istate->cache = xcalloc(istate->cache_alloc, sizeof(*istate->cache));
14491449
istate->initialized = 1;
14501450

14511451
if (istate->version == 4)

0 commit comments

Comments
 (0)