summaryrefslogtreecommitdiff
path: root/src/signature.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-12-27 13:47:34 -0600
committerEdward Thomson <ethomson@edwardthomson.com>2019-01-22 22:30:35 +0000
commitf673e232afe22eb865cdc915e55a2df6493f0fbb (patch)
treee79e3e6fb1e1d78367679aea75e66c8141b4daa8 /src/signature.c
parent647dfdb42d06514a85c1499f1be88a32b8a4c24b (diff)
downloadlibgit2-f673e232afe22eb865cdc915e55a2df6493f0fbb.tar.gz
git_error: use new names in internal APIs and usage
Move to the `git_error` name in the internal API for error-related functions.
Diffstat (limited to 'src/signature.c')
-rw-r--r--src/signature.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/signature.c b/src/signature.c
index 11416d786..f4c8a104a 100644
--- a/src/signature.c
+++ b/src/signature.c
@@ -25,7 +25,7 @@ void git_signature_free(git_signature *sig)
static int signature_error(const char *msg)
{
- giterr_set(GITERR_INVALID, "failed to parse signature - %s", msg);
+ git_error_set(GIT_ERROR_INVALID, "failed to parse signature - %s", msg);
return -1;
}
@@ -76,12 +76,12 @@ int git_signature_new(git_signature **sig_out, const char *name, const char *ema
}
p = git__calloc(1, sizeof(git_signature));
- GITERR_CHECK_ALLOC(p);
+ GIT_ERROR_CHECK_ALLOC(p);
p->name = extract_trimmed(name, strlen(name));
- GITERR_CHECK_ALLOC(p->name);
+ GIT_ERROR_CHECK_ALLOC(p->name);
p->email = extract_trimmed(email, strlen(email));
- GITERR_CHECK_ALLOC(p->email);
+ GIT_ERROR_CHECK_ALLOC(p->email);
if (p->name[0] == '\0' || p->email[0] == '\0') {
git_signature_free(p);
@@ -104,13 +104,13 @@ int git_signature_dup(git_signature **dest, const git_signature *source)
return 0;
signature = git__calloc(1, sizeof(git_signature));
- GITERR_CHECK_ALLOC(signature);
+ GIT_ERROR_CHECK_ALLOC(signature);
signature->name = git__strdup(source->name);
- GITERR_CHECK_ALLOC(signature->name);
+ GIT_ERROR_CHECK_ALLOC(signature->name);
signature->email = git__strdup(source->email);
- GITERR_CHECK_ALLOC(signature->email);
+ GIT_ERROR_CHECK_ALLOC(signature->email);
signature->when.time = source->when.time;
signature->when.offset = source->when.offset;
@@ -129,13 +129,13 @@ int git_signature__pdup(git_signature **dest, const git_signature *source, git_p
return 0;
signature = git_pool_mallocz(pool, sizeof(git_signature));
- GITERR_CHECK_ALLOC(signature);
+ GIT_ERROR_CHECK_ALLOC(signature);
signature->name = git_pool_strdup(pool, source->name);
- GITERR_CHECK_ALLOC(signature->name);
+ GIT_ERROR_CHECK_ALLOC(signature->name);
signature->email = git_pool_strdup(pool, source->email);
- GITERR_CHECK_ALLOC(signature->email);
+ GIT_ERROR_CHECK_ALLOC(signature->email);
signature->when.time = source->when.time;
signature->when.offset = source->when.offset;
@@ -284,7 +284,7 @@ int git_signature_from_buffer(git_signature **out, const char *buf)
*out = NULL;
sig = git__calloc(1, sizeof(git_signature));
- GITERR_CHECK_ALLOC(sig);
+ GIT_ERROR_CHECK_ALLOC(sig);
buf_end = buf + strlen(buf);
error = git_signature__parse(sig, &buf, buf_end, NULL, '\0');