remove unused parameter of get_object_idx()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
diff --git a/lib/pack.c b/lib/pack.c
index e50ad5c..b185f2e 100644
--- a/lib/pack.c
+++ b/lib/pack.c
@@ -461,8 +461,7 @@ get_object_offset(struct got_packidx *packidx, int idx)
}
static int
-get_object_idx(struct got_packidx *packidx, struct got_object_id *id,
- struct got_repository *repo)
+get_object_idx(struct got_packidx *packidx, struct got_object_id *id)
{
u_int8_t id0 = id->sha1[0];
uint32_t totobj = betoh32(packidx->hdr.fanout_table[0xff]);
@@ -529,7 +528,7 @@ search_packidx(struct got_packidx **packidx, int *idx,
for (i = 0; i < nitems(repo->packidx_cache); i++) {
if (repo->packidx_cache[i] == NULL)
break;
- *idx = get_object_idx(repo->packidx_cache[i], id, repo);
+ *idx = get_object_idx(repo->packidx_cache[i], id);
if (*idx != -1) {
*packidx = repo->packidx_cache[i];
return NULL;
@@ -562,7 +561,7 @@ search_packidx(struct got_packidx **packidx, int *idx,
if (err)
goto done;
- *idx = get_object_idx(*packidx, id, repo);
+ *idx = get_object_idx(*packidx, id);
if (*idx != -1) {
err = NULL; /* found the object */
err = cache_packidx(*packidx, repo);
@@ -1041,7 +1040,7 @@ resolve_ref_delta(struct got_delta_chain *deltas, struct got_repository *repo,
goto done;
/* Delta base must be in the same pack file. */
- idx = get_object_idx(packidx, &id, repo);
+ idx = get_object_idx(packidx, &id);
if (idx == -1) {
err = got_error(GOT_ERR_BAD_PACKFILE);
goto done;