merge_file: use GIT_ASSERT
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
diff --git a/src/merge_file.c b/src/merge_file.c
index 755340f..bfa3ec5 100644
--- a/src/merge_file.c
+++ b/src/merge_file.c
@@ -36,7 +36,10 @@ static int merge_file_input_from_index(
{
int error = 0;
- assert(input_out && odb_object_out && odb && entry);
+ GIT_ASSERT_ARG(input_out);
+ GIT_ASSERT_ARG(odb_object_out);
+ GIT_ASSERT_ARG(odb);
+ GIT_ASSERT_ARG(entry);
if ((error = git_odb_read(odb_object_out, odb, &entry->id)) < 0)
goto done;
@@ -241,7 +244,9 @@ int git_merge_file(
{
git_merge_file_input inputs[3] = { {0} };
- assert(out && ours && theirs);
+ GIT_ASSERT_ARG(out);
+ GIT_ASSERT_ARG(ours);
+ GIT_ASSERT_ARG(theirs);
memset(out, 0x0, sizeof(git_merge_file_result));
@@ -268,7 +273,10 @@ int git_merge_file_from_index(
git_odb_object *odb_object[3] = { 0 };
int error = 0;
- assert(out && repo && ours && theirs);
+ GIT_ASSERT_ARG(out);
+ GIT_ASSERT_ARG(repo);
+ GIT_ASSERT_ARG(ours);
+ GIT_ASSERT_ARG(theirs);
memset(out, 0x0, sizeof(git_merge_file_result));