summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2020-04-05 17:20:46 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2020-11-27 11:09:20 +0000
commit6718ad9fae65db3988b37e4893946c565f1806ca (patch)
tree660692229b8c7d67a16c85de54995f8e500d97ba
parent05816a98e95b0fb3897f1e8482494893c20673bb (diff)
downloadlibgit2-6718ad9fae65db3988b37e4893946c565f1806ca.tar.gz
notes: use GIT_ASSERT
-rw-r--r--src/notes.c15
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 &note->id;
}