Commit 00e57f64 by Edward Thomson

reader: use GIT_ASSERT

parent 9cd6481e
......@@ -61,7 +61,8 @@ int git_reader_for_tree(git_reader **out, git_tree *tree)
{
tree_reader *reader;
assert(out && tree);
GIT_ASSERT_ARG(out);
GIT_ASSERT_ARG(tree);
reader = git__calloc(1, sizeof(tree_reader));
GIT_ERROR_CHECK_ALLOC(reader);
......@@ -158,7 +159,8 @@ int git_reader_for_workdir(
workdir_reader *reader;
int error;
assert(out && repo);
GIT_ASSERT_ARG(out);
GIT_ASSERT_ARG(repo);
reader = git__calloc(1, sizeof(workdir_reader));
GIT_ERROR_CHECK_ALLOC(reader);
......@@ -223,7 +225,8 @@ int git_reader_for_index(
index_reader *reader;
int error;
assert(out && repo);
GIT_ASSERT_ARG(out);
GIT_ASSERT_ARG(repo);
reader = git__calloc(1, sizeof(index_reader));
GIT_ERROR_CHECK_ALLOC(reader);
......@@ -251,7 +254,9 @@ int git_reader_read(
git_reader *reader,
const char *filename)
{
assert(out && reader && filename);
GIT_ASSERT_ARG(out);
GIT_ASSERT_ARG(reader);
GIT_ASSERT_ARG(filename);
return reader->read(out, out_id, out_filemode, reader, filename);
}
......
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