Commit 6718ad9f by Edward Thomson

notes: use GIT_ASSERT

parent 05816a98
......@@ -627,7 +627,8 @@ int git_note_default_ref(git_buf *out, git_repository *repo)
char *default_ref;
int error;
assert(out && repo);
GIT_ASSERT_ARG(out);
GIT_ASSERT_ARG(repo);
if ((error = git_buf_sanitize(out)) < 0 ||
(error = note_get_default_ref(&default_ref, repo)) < 0)
......@@ -639,25 +640,25 @@ int git_note_default_ref(git_buf *out, git_repository *repo)
const git_signature *git_note_committer(const git_note *note)
{
assert(note);
GIT_ASSERT_ARG_WITH_RETVAL(note, NULL);
return note->committer;
}
const git_signature *git_note_author(const git_note *note)
{
assert(note);
GIT_ASSERT_ARG_WITH_RETVAL(note, NULL);
return note->author;
}
const char * git_note_message(const git_note *note)
const char *git_note_message(const git_note *note)
{
assert(note);
GIT_ASSERT_ARG_WITH_RETVAL(note, NULL);
return note->message;
}
const git_oid * git_note_id(const git_note *note)
const git_oid *git_note_id(const git_note *note)
{
assert(note);
GIT_ASSERT_ARG_WITH_RETVAL(note, NULL);
return &note->id;
}
......
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