diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2018-12-27 13:47:34 -0600 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-01-22 22:30:35 +0000 |
| commit | f673e232afe22eb865cdc915e55a2df6493f0fbb (patch) | |
| tree | e79e3e6fb1e1d78367679aea75e66c8141b4daa8 /src/oid.c | |
| parent | 647dfdb42d06514a85c1499f1be88a32b8a4c24b (diff) | |
| download | libgit2-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/oid.c')
| -rw-r--r-- | src/oid.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -17,7 +17,7 @@ static char to_hex[] = "0123456789abcdef"; static int oid_error_invalid(const char *msg) { - giterr_set(GITERR_INVALID, "unable to parse OID - %s", msg); + git_error_set(GIT_ERROR_INVALID, "unable to parse OID - %s", msg); return -1; } @@ -263,7 +263,7 @@ struct git_oid_shorten { static int resize_trie(git_oid_shorten *self, size_t new_size) { self->nodes = git__reallocarray(self->nodes, new_size, sizeof(trie_node)); - GITERR_CHECK_ALLOC(self->nodes); + GIT_ERROR_CHECK_ALLOC(self->nodes); if (new_size > self->size) { memset(&self->nodes[self->size], 0x0, (new_size - self->size) * sizeof(trie_node)); @@ -381,7 +381,7 @@ int git_oid_shorten_add(git_oid_shorten *os, const char *text_oid) node_index idx; if (os->full) { - giterr_set(GITERR_INVALID, "unable to shorten OID - OID set full"); + git_error_set(GIT_ERROR_INVALID, "unable to shorten OID - OID set full"); return -1; } @@ -396,7 +396,7 @@ int git_oid_shorten_add(git_oid_shorten *os, const char *text_oid) trie_node *node; if (c == -1) { - giterr_set(GITERR_INVALID, "unable to shorten OID - invalid hex value"); + git_error_set(GIT_ERROR_INVALID, "unable to shorten OID - invalid hex value"); return -1; } @@ -411,7 +411,7 @@ int git_oid_shorten_add(git_oid_shorten *os, const char *text_oid) node = push_leaf(os, idx, git__fromhex(tail[0]), &tail[1]); if (node == NULL) { if (os->full) - giterr_set(GITERR_INVALID, "unable to shorten OID - OID set full"); + git_error_set(GIT_ERROR_INVALID, "unable to shorten OID - OID set full"); return -1; } } @@ -419,7 +419,7 @@ int git_oid_shorten_add(git_oid_shorten *os, const char *text_oid) if (node->children[c] == 0) { if (push_leaf(os, idx, c, &text_oid[i + 1]) == NULL) { if (os->full) - giterr_set(GITERR_INVALID, "unable to shorten OID - OID set full"); + git_error_set(GIT_ERROR_INVALID, "unable to shorten OID - OID set full"); return -1; } break; |
