Skip to content

Commit

Permalink
pack-objects: remove bogus arguments to delta_cacheable()
Browse files Browse the repository at this point in the history
Not only are they unused, but the order in the function declaration
and the actual usage don't match.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Nicolas Pitre authored and Junio C Hamano committed Aug 16, 2007
1 parent e06c5a6 commit d250626
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions builtin-pack-objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -1273,9 +1273,8 @@ struct unpacked {
unsigned depth;
};

static int delta_cacheable(struct unpacked *trg, struct unpacked *src,
unsigned long src_size, unsigned long trg_size,
unsigned long delta_size)
static int delta_cacheable(unsigned long src_size, unsigned long trg_size,
unsigned long delta_size)
{
if (max_delta_cache_size && delta_cache_size + delta_size > max_delta_cache_size)
return 0;
Expand Down Expand Up @@ -1397,7 +1396,7 @@ static int try_delta(struct unpacked *trg, struct unpacked *src,
trg_entry->delta_size = delta_size;
trg->depth = src->depth + 1;

if (delta_cacheable(src, trg, src_size, trg_size, delta_size)) {
if (delta_cacheable(src_size, trg_size, delta_size)) {
trg_entry->delta_data = xrealloc(delta_buf, delta_size);
delta_cache_size += trg_entry->delta_size;
} else
Expand Down

0 comments on commit d250626

Please sign in to comment.