diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2013-05-30 08:56:19 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-03 10:10:38 -0700 |
commit | c4aa3167fe9dd0b94594c20d8b3673929fcb217d (patch) | |
tree | b3ea1c95708b7188eea1ea21f84f49617e14af98 /read-cache.c | |
parent | 582eb8536bfc93e403b008e2d660a6f246a2ff46 (diff) | |
download | git-c4aa3167fe9dd0b94594c20d8b3673929fcb217d.tar.gz |
read-cache: trivial style cleanups
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'read-cache.c')
-rw-r--r-- | read-cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/read-cache.c b/read-cache.c index aeda7180ba..3bb5c91d06 100644 --- a/read-cache.c +++ b/read-cache.c @@ -975,7 +975,7 @@ int add_index_entry(struct index_state *istate, struct cache_entry *ce, int opti if (istate->cache_nr == istate->cache_alloc) { istate->cache_alloc = alloc_nr(istate->cache_alloc); istate->cache = xrealloc(istate->cache, - istate->cache_alloc * sizeof(struct cache_entry *)); + istate->cache_alloc * sizeof(*istate->cache)); } /* Add it in.. */ @@ -1445,7 +1445,7 @@ int read_index_from(struct index_state *istate, const char *path) istate->version = ntohl(hdr->hdr_version); istate->cache_nr = ntohl(hdr->hdr_entries); istate->cache_alloc = alloc_nr(istate->cache_nr); - istate->cache = xcalloc(istate->cache_alloc, sizeof(struct cache_entry *)); + istate->cache = xcalloc(istate->cache_alloc, sizeof(*istate->cache)); istate->initialized = 1; if (istate->version == 4) |