summaryrefslogtreecommitdiff
path: root/src/submodule.c
diff options
context:
space:
mode:
authorPhilip Kelley <phkelley@hotmail.com>2013-01-27 14:17:07 -0500
committerPhilip Kelley <phkelley@hotmail.com>2013-01-27 14:17:07 -0500
commit11d9f6b30438a141def883b0115f7f764c03e990 (patch)
treeabe54e8085c4e3a1c7a822ee256f81e0d58e6b42 /src/submodule.c
parentaa3bf89df21c44f22fe70b4aac9109646fd06b48 (diff)
downloadlibgit2-11d9f6b30438a141def883b0115f7f764c03e990.tar.gz
Vector improvements and their fallout
Diffstat (limited to 'src/submodule.c')
-rw-r--r--src/submodule.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/submodule.c b/src/submodule.c
index 2be179303..359306498 100644
--- a/src/submodule.c
+++ b/src/submodule.c
@@ -157,7 +157,7 @@ int git_submodule_foreach(
* and path are not the same.
*/
if (sm->refcount > 1) {
- if (git_vector_bsearch(&seen, sm) != GIT_ENOTFOUND)
+ if (git_vector_bsearch(NULL, &seen, sm) != GIT_ENOTFOUND)
continue;
if ((error = git_vector_insert(&seen, sm)) < 0)
break;
@@ -716,7 +716,8 @@ int git_submodule_reload(git_submodule *submodule)
{
git_repository *repo;
git_index *index;
- int pos, error;
+ int error;
+ size_t pos;
git_tree *head;
git_config_backend *mods;
@@ -732,8 +733,7 @@ int git_submodule_reload(git_submodule *submodule)
~(GIT_SUBMODULE_STATUS_IN_INDEX |
GIT_SUBMODULE_STATUS__INDEX_OID_VALID);
- pos = git_index_find(index, submodule->path);
- if (pos >= 0) {
+ if (!git_index_find(&pos, index, submodule->path)) {
const git_index_entry *entry = git_index_get_byindex(index, pos);
if (S_ISGITLINK(entry->mode)) {