diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2020-04-05 17:20:46 +0100 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2020-11-27 11:09:20 +0000 |
commit | 6718ad9fae65db3988b37e4893946c565f1806ca (patch) | |
tree | 660692229b8c7d67a16c85de54995f8e500d97ba /src/notes.c | |
parent | 05816a98e95b0fb3897f1e8482494893c20673bb (diff) | |
download | libgit2-6718ad9fae65db3988b37e4893946c565f1806ca.tar.gz |
notes: use GIT_ASSERT
Diffstat (limited to 'src/notes.c')
-rw-r--r-- | src/notes.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/notes.c b/src/notes.c index a3c4b7c4f..b9e198599 100644 --- a/src/notes.c +++ b/src/notes.c @@ -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 ¬e->id; } |