diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2020-04-05 17:35:19 +0100 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2020-11-27 11:09:20 +0000 |
| commit | 87d378961cc05daeefefdb1023a738249b8c6cf6 (patch) | |
| tree | f8fedd5e4572804c846ba8028a21cc5a2208d556 /src/oid.c | |
| parent | a072a025712d5ffcac6bd017318df8ad816318a1 (diff) | |
| download | libgit2-87d378961cc05daeefefdb1023a738249b8c6cf6.tar.gz | |
oid: use GIT_ASSERT
Diffstat (limited to 'src/oid.c')
| -rw-r--r-- | src/oid.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -26,7 +26,8 @@ int git_oid_fromstrn(git_oid *out, const char *str, size_t length) size_t p; int v; - assert(out && str); + GIT_ASSERT_ARG(out); + GIT_ASSERT_ARG(str); if (!length) return oid_error_invalid("too short"); @@ -316,7 +317,7 @@ git_oid_shorten *git_oid_shorten_new(size_t min_length) { git_oid_shorten *os; - assert((size_t)((int)min_length) == min_length); + GIT_ASSERT_ARG_WITH_RETVAL((size_t)((int)min_length) == min_length, NULL); os = git__calloc(1, sizeof(git_oid_shorten)); if (os == NULL) |
