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/tree-cache.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/tree-cache.c')
| -rw-r--r-- | src/tree-cache.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tree-cache.c b/src/tree-cache.c index c33e6af9e..d3ba864eb 100644 --- a/src/tree-cache.c +++ b/src/tree-cache.c @@ -123,7 +123,7 @@ static int read_tree_internal(git_tree_cache **out, unsigned int i; tree->children = git_pool_malloc(pool, tree->children_count * sizeof(git_tree_cache *)); - GITERR_CHECK_ALLOC(tree->children); + GIT_ERROR_CHECK_ALLOC(tree->children); memset(tree->children, 0x0, tree->children_count * sizeof(git_tree_cache *)); @@ -138,7 +138,7 @@ static int read_tree_internal(git_tree_cache **out, return 0; corrupted: - giterr_set(GITERR_INDEX, "corrupted TREE extension in index"); + git_error_set(GIT_ERROR_INDEX, "corrupted TREE extension in index"); return -1; } @@ -150,7 +150,7 @@ int git_tree_cache_read(git_tree_cache **tree, const char *buffer, size_t buffer return -1; if (buffer < buffer_end) { - giterr_set(GITERR_INDEX, "corrupted TREE extension in index (unexpected trailing data)"); + git_error_set(GIT_ERROR_INDEX, "corrupted TREE extension in index (unexpected trailing data)"); return -1; } @@ -184,7 +184,7 @@ static int read_tree_recursive(git_tree_cache *cache, const git_tree *tree, git_ cache->children_count = ntrees; cache->children = git_pool_mallocz(pool, ntrees * sizeof(git_tree_cache *)); - GITERR_CHECK_ALLOC(cache->children); + GIT_ERROR_CHECK_ALLOC(cache->children); j = 0; for (i = 0; i < nentries; i++) { @@ -237,7 +237,7 @@ int git_tree_cache_new(git_tree_cache **out, const char *name, git_pool *pool) name_len = strlen(name); tree = git_pool_malloc(pool, sizeof(git_tree_cache) + name_len + 1); - GITERR_CHECK_ALLOC(tree); + GIT_ERROR_CHECK_ALLOC(tree); memset(tree, 0x0, sizeof(git_tree_cache)); /* NUL-terminated tree name */ |
