Commit 87d37896 by Edward Thomson

oid: use GIT_ASSERT

parent a072a025
...@@ -26,7 +26,8 @@ int git_oid_fromstrn(git_oid *out, const char *str, size_t length) ...@@ -26,7 +26,8 @@ int git_oid_fromstrn(git_oid *out, const char *str, size_t length)
size_t p; size_t p;
int v; int v;
assert(out && str); GIT_ASSERT_ARG(out);
GIT_ASSERT_ARG(str);
if (!length) if (!length)
return oid_error_invalid("too short"); return oid_error_invalid("too short");
...@@ -316,7 +317,7 @@ git_oid_shorten *git_oid_shorten_new(size_t min_length) ...@@ -316,7 +317,7 @@ git_oid_shorten *git_oid_shorten_new(size_t min_length)
{ {
git_oid_shorten *os; 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)); os = git__calloc(1, sizeof(git_oid_shorten));
if (os == NULL) if (os == NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment