diff options
| author | Patrick Steinhardt <ps@pks.im> | 2017-01-25 14:11:42 +0100 |
|---|---|---|
| committer | Patrick Steinhardt <ps@pks.im> | 2017-02-17 11:41:06 +0100 |
| commit | 036daa59e94bbe1a14ccd8fa018618393a0c62fb (patch) | |
| tree | 3489354e8437b00f4dbe7ef1809457b53bdf25db /src/indexer.c | |
| parent | 9694d9ba794b36ebc9fc186c43464a08c2f84c4d (diff) | |
| download | libgit2-036daa59e94bbe1a14ccd8fa018618393a0c62fb.tar.gz | |
khash: use `git_map_exists` where applicable
Diffstat (limited to 'src/indexer.c')
| -rw-r--r-- | src/indexer.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/indexer.c b/src/indexer.c index 8b5fa6efd..b5d5fd0d2 100644 --- a/src/indexer.c +++ b/src/indexer.c @@ -333,9 +333,7 @@ on_error: GIT_INLINE(bool) has_entry(git_indexer *idx, git_oid *id) { - khiter_t k; - k = kh_get(oid, idx->pack->idx_cache, id); - return (k != kh_end(idx->pack->idx_cache)); + return git_oidmap_exists(idx->pack->idx_cache, id); } static int save_entry(git_indexer *idx, struct entry *entry, struct git_pack_entry *pentry, git_off_t entry_start) |
