Commit 87b7a7051b8aa50bddc806a46240e7b15e3e23cc

Edward Thomson 2017-01-21T15:44:57

indexer: avoid warning about `idx->pack` It must be non-NULL to have a valid `git_indexer`.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/indexer.c b/src/indexer.c
index 805c36e..951d717 100644
--- a/src/indexer.c
+++ b/src/indexer.c
@@ -1081,7 +1081,7 @@ void git_indexer_free(git_indexer *idx)
 
 	git_vector_free_deep(&idx->objects);
 
-	if (idx->pack && idx->pack->idx_cache) {
+	if (idx->pack->idx_cache) {
 		struct git_pack_entry *pentry;
 		kh_foreach_value(
 			idx->pack->idx_cache, pentry, { git__free(pentry); });