Commit a08bd547 by Edward Thomson

fetchhead: use GIT_ASSERT

parent 59565a05
......@@ -73,7 +73,8 @@ int git_fetchhead_ref_create(
{
git_fetchhead_ref *fetchhead_ref;
assert(out && oid);
GIT_ASSERT_ARG(out);
GIT_ASSERT_ARG(oid);
*out = NULL;
......@@ -108,7 +109,8 @@ static int fetchhead_ref_write(
const char *type, *name;
int head = 0;
assert(file && fetchhead_ref);
GIT_ASSERT_ARG(file);
GIT_ASSERT_ARG(fetchhead_ref);
git_oid_fmt(oid, &fetchhead_ref->oid);
oid[GIT_OID_HEXSZ] = '\0';
......@@ -145,7 +147,8 @@ int git_fetchhead_write(git_repository *repo, git_vector *fetchhead_refs)
unsigned int i;
git_fetchhead_ref *fetchhead_ref;
assert(repo && fetchhead_refs);
GIT_ASSERT_ARG(repo);
GIT_ASSERT_ARG(fetchhead_refs);
if (git_buf_joinpath(&path, repo->gitdir, GIT_FETCH_HEAD_FILE) < 0)
return -1;
......@@ -279,7 +282,8 @@ int git_repository_fetchhead_foreach(git_repository *repo,
size_t line_num = 0;
int error = 0;
assert(repo && cb);
GIT_ASSERT_ARG(repo);
GIT_ASSERT_ARG(cb);
if (git_buf_joinpath(&path, repo->gitdir, GIT_FETCH_HEAD_FILE) < 0)
return -1;
......
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