From: Nicolas Pitre <nico@cam.org>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: [PATCH] pack-objects: remove bogus arguments to delta_cacheable()
Date: Wed, 15 Aug 2007 22:46:01 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.0.999.0708152241430.16727@xanadu.home> (raw)
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>
---
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 51a850e..24926db 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -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;
@@ -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
next reply other threads:[~2007-08-16 2:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-16 2:46 Nicolas Pitre [this message]
2007-08-16 6:18 ` [PATCH] pack-objects: remove bogus arguments to delta_cacheable() Martin Koegler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.0.999.0708152241430.16727@xanadu.home \
--to=nico@cam.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).