signature: use GIT_ASSERT
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
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 &&