Skip to content

Commit 87d3789

Browse files
committed
oid: use GIT_ASSERT
1 parent a072a02 commit 87d3789

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/oid.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ int git_oid_fromstrn(git_oid *out, const char *str, size_t length)
2626
size_t p;
2727
int v;
2828

29-
assert(out && str);
29+
GIT_ASSERT_ARG(out);
30+
GIT_ASSERT_ARG(str);
3031

3132
if (!length)
3233
return oid_error_invalid("too short");
@@ -316,7 +317,7 @@ git_oid_shorten *git_oid_shorten_new(size_t min_length)
316317
{
317318
git_oid_shorten *os;
318319

319-
assert((size_t)((int)min_length) == min_length);
320+
GIT_ASSERT_ARG_WITH_RETVAL((size_t)((int)min_length) == min_length, NULL);
320321

321322
os = git__calloc(1, sizeof(git_oid_shorten));
322323
if (os == NULL)

0 commit comments

Comments
 (0)