diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2019-06-08 17:28:35 -0500 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-06-08 17:28:35 -0500 |
commit | e2d4f89c4999327c8eb1cf47b38fab43756b6c13 (patch) | |
tree | ff7b387caad5bba97799f150b51cd972158f0de1 /src/odb.c | |
parent | e50d138e898dd034161663873f75716086266f86 (diff) | |
download | libgit2-ethomson/is_and_from.tar.gz |
oid: `is_zero` instead of `iszero`ethomson/is_and_from
The only function that is named `issomething` (without underscore) was
`git_oid_iszero`. Rename it to `git_oid_is_zero` for consistency with
the rest of the library.
Diffstat (limited to 'src/odb.c')
-rw-r--r-- | src/odb.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -766,7 +766,7 @@ int git_odb_exists(git_odb *db, const git_oid *id) assert(db && id); - if (git_oid_iszero(id)) + if (git_oid_is_zero(id)) return 0; if ((object = git_cache_get_raw(odb_cache(db), id)) != NULL) { @@ -994,7 +994,7 @@ int git_odb__read_header_or_object( *out = NULL; - if (git_oid_iszero(id)) + if (git_oid_is_zero(id)) return error_null_oid(GIT_ENOTFOUND, "cannot read object"); if ((object = git_cache_get_raw(odb_cache(db), id)) != NULL) { @@ -1099,7 +1099,7 @@ int git_odb_read(git_odb_object **out, git_odb *db, const git_oid *id) assert(out && db && id); - if (git_oid_iszero(id)) + if (git_oid_is_zero(id)) return error_null_oid(GIT_ENOTFOUND, "cannot read object"); *out = git_cache_get_raw(odb_cache(db), id); @@ -1123,7 +1123,7 @@ static int odb_otype_fast(git_object_t *type_p, git_odb *db, const git_oid *id) size_t _unused; int error; - if (git_oid_iszero(id)) + if (git_oid_is_zero(id)) return error_null_oid(GIT_ENOTFOUND, "cannot get object type"); if ((object = git_cache_get_raw(odb_cache(db), id)) != NULL) { @@ -1283,7 +1283,7 @@ int git_odb_write( git_odb_hash(oid, data, len, type); - if (git_oid_iszero(oid)) + if (git_oid_is_zero(oid)) return error_null_oid(GIT_EINVALID, "cannot write object"); if (git_odb__freshen(db, oid)) |