if (len1 > len2)
return 1;
- /* Differences between "assume up-to-date" should not matter. */
- flags1 &= ~CE_VALID;
- flags2 &= ~CE_VALID;
+ /* Compare stages */
+ flags1 &= CE_STAGEMASK;
+ flags2 &= CE_STAGEMASK;
if (flags1 < flags2)
return -1;
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++) {