diff options
| author | Russell Belfer <arrbee@arrbee.com> | 2012-03-16 15:56:01 -0700 |
|---|---|---|
| committer | Russell Belfer <arrbee@arrbee.com> | 2012-03-16 15:56:01 -0700 |
| commit | 0d0fa7c3681e4ef3d0452666a9bc97d4b08391c9 (patch) | |
| tree | 5e03e03bf9dc2f6125f4fb450cd3239d882b824f /src/refs.c | |
| parent | 4cfe2ab60b1e26554b2bf753b06f538cb3475bd0 (diff) | |
| download | libgit2-0d0fa7c3681e4ef3d0452666a9bc97d4b08391c9.tar.gz | |
Convert attr, ignore, mwindow, status to new errors
Also cleaned up some previously converted code that still had
little things to polish.
Diffstat (limited to 'src/refs.c')
| -rw-r--r-- | src/refs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/refs.c b/src/refs.c index b4c4b1ec1..ed364cf90 100644 --- a/src/refs.c +++ b/src/refs.c @@ -186,7 +186,7 @@ static int loose_parse_oid(git_oid *oid, git_buf *file_content) if (*buffer != '\n') goto corrupt; - return GIT_SUCCESS; + return 0; corrupt: giterr_set(GITERR_REFERENCE, "Corrupted loose reference file"); @@ -200,7 +200,7 @@ static git_rtype loose_guess_rtype(const git_buf *full_path) type = GIT_REF_INVALID; - if (git_futils_readbuffer(&ref_file, full_path->ptr) == GIT_SUCCESS) { + if (git_futils_readbuffer(&ref_file, full_path->ptr) == 0) { if (git__prefixcmp((const char *)(ref_file.ptr), GIT_SYMREF) == 0) type = GIT_REF_SYMBOLIC; else @@ -335,7 +335,7 @@ static int packed_parse_peel( goto corrupt; /* Is this a valid object id? */ - if (git_oid_fromstr(&tag_ref->peel, buffer) < GIT_SUCCESS) + if (git_oid_fromstr(&tag_ref->peel, buffer) < 0) goto corrupt; buffer = buffer + GIT_OID_HEXSZ; @@ -1483,7 +1483,7 @@ int git_reference_listall( array->strings = NULL; array->count = 0; - if (git_vector_init(&ref_list, 8, NULL) < GIT_SUCCESS) + if (git_vector_init(&ref_list, 8, NULL) < 0) return -1; if (git_reference_foreach( |
