Commit 42594f3ffa2090697d229c6766e4e871e1c28386

Edward Thomson 2020-04-05T22:00:36

signature: use GIT_ASSERT

diff --git a/src/signature.c b/src/signature.c
index f4c8a10..0fbd3d5 100644
--- a/src/signature.c
+++ b/src/signature.c
@@ -65,7 +65,8 @@ int git_signature_new(git_signature **sig_out, const char *name, const char *ema
 {
 	git_signature *p = NULL;
 
-	assert(name && email);
+	GIT_ASSERT_ARG(name);
+	GIT_ASSERT_ARG(email);
 
 	*sig_out = NULL;
 
@@ -279,7 +280,8 @@ int git_signature_from_buffer(git_signature **out, const char *buf)
 	const char *buf_end;
 	int error;
 
-	assert(out && buf);
+	GIT_ASSERT_ARG(out);
+	GIT_ASSERT_ARG(buf);
 
 	*out = NULL;
 
@@ -302,7 +304,8 @@ void git_signature__writebuf(git_buf *buf, const char *header, const git_signatu
 	int offset, hours, mins;
 	char sign;
 
-	assert(buf && sig);
+	GIT_ASSERT_ARG(buf);
+	GIT_ASSERT_ARG(sig);
 
 	offset = sig->when.offset;
 	sign = (sig->when.offset < 0 || sig->when.sign == '-') ? '-' : '+';
@@ -320,7 +323,8 @@ void git_signature__writebuf(git_buf *buf, const char *header, const git_signatu
 
 bool git_signature__equal(const git_signature *one, const git_signature *two)
 {
-	assert(one && two);
+	GIT_ASSERT_ARG(one);
+	GIT_ASSERT_ARG(two);
 
 	return
 		git__strcmp(one->name, two->name) == 0 &&