summaryrefslogtreecommitdiff
path: root/src/index.c
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2012-02-17 00:13:34 +0100
committerVicent Martí <tanoku@gmail.com>2012-03-06 00:43:10 +0100
commit1a48112342932e9fcd45a1ff5935f1c9c53b83d1 (patch)
treefbb18cfe64e65025c6e1790972d1a106eea4cc54 /src/index.c
parent45d387ac78bcf3167d69b736d0b322717bc492d4 (diff)
downloadlibgit2-1a48112342932e9fcd45a1ff5935f1c9c53b83d1.tar.gz
error-handling: References
Yes, this is error handling solely for `refs.c`, but some of the abstractions leak all ofer the code base.
Diffstat (limited to 'src/index.c')
-rw-r--r--src/index.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/index.c b/src/index.c
index 5ac99de3e..b646dfcbb 100644
--- a/src/index.c
+++ b/src/index.c
@@ -150,7 +150,7 @@ int git_index_open(git_index **index_out, const char *index_path)
git_vector_init(&index->entries, 32, index_cmp);
/* Check if index file is stored on disk already */
- if (git_path_exists(index->index_file_path) == 0)
+ if (git_path_exists(index->index_file_path) == true)
index->on_disk = 1;
*index_out = index;
@@ -221,7 +221,7 @@ int git_index_read(git_index *index)
assert(index->index_file_path);
- if (!index->on_disk || git_path_exists(index->index_file_path) < 0) {
+ if (!index->on_disk || git_path_exists(index->index_file_path) == false) {
git_index_clear(index);
index->on_disk = 0;
return GIT_SUCCESS;