summaryrefslogtreecommitdiff
path: root/src/pack-objects.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2017-01-25 15:31:12 +0100
committerPatrick Steinhardt <ps@pks.im>2017-02-17 11:41:06 +0100
commitf31cb45ad2ca46cc743dfadf5ac8b916cbe4ea9c (patch)
treeed98640b9181f3cfae95e63711ca7200c7e7be3d /src/pack-objects.c
parenta8cd560b10149208aabcfe515b2e1b6c5be6388f (diff)
downloadlibgit2-f31cb45ad2ca46cc743dfadf5ac8b916cbe4ea9c.tar.gz
khash: avoid using `kh_put` directly
Diffstat (limited to 'src/pack-objects.c')
-rw-r--r--src/pack-objects.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pack-objects.c b/src/pack-objects.c
index 01286fa56..1604744c3 100644
--- a/src/pack-objects.c
+++ b/src/pack-objects.c
@@ -199,7 +199,7 @@ static void rehash(git_packbuilder *pb)
git_oidmap_clear(pb->object_ix);
for (i = 0, po = pb->object_list; i < pb->nr_objects; i++, po++) {
- pos = kh_put(oid, pb->object_ix, &po->id, &ret);
+ pos = git_oidmap_put(pb->object_ix, &po->id, &ret);
git_oidmap_value_at(pb->object_ix, pos) = po;
}
}
@@ -246,7 +246,7 @@ int git_packbuilder_insert(git_packbuilder *pb, const git_oid *oid,
git_oid_cpy(&po->id, oid);
po->hash = name_hash(name);
- pos = kh_put(oid, pb->object_ix, &po->id, &ret);
+ pos = git_oidmap_put(pb->object_ix, &po->id, &ret);
if (ret < 0) {
giterr_set_oom();
return ret;