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/attr_file.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/attr_file.c')
-rw-r--r-- | src/attr_file.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/attr_file.c b/src/attr_file.c index f43375568..bd69c631b 100644 --- a/src/attr_file.c +++ b/src/attr_file.c @@ -34,10 +34,10 @@ int git_attr_file__new( git_attr_file_source source) { git_attr_file *attrs = git__calloc(1, sizeof(git_attr_file)); - GITERR_CHECK_ALLOC(attrs); + GIT_ERROR_CHECK_ALLOC(attrs); if (git_mutex_init(&attrs->lock) < 0) { - giterr_set(GITERR_OS, "failed to initialize lock"); + git_error_set(GIT_ERROR_OS, "failed to initialize lock"); git__free(attrs); return -1; } @@ -56,7 +56,7 @@ int git_attr_file__clear_rules(git_attr_file *file, bool need_lock) git_attr_rule *rule; if (need_lock && git_mutex_lock(&file->lock) < 0) { - giterr_set(GITERR_OS, "failed to lock attribute file"); + git_error_set(GIT_ERROR_OS, "failed to lock attribute file"); return -1; } @@ -147,7 +147,7 @@ int git_attr_file__load( break; } default: - giterr_set(GITERR_INVALID, "unknown file source %d", source); + git_error_set(GIT_ERROR_INVALID, "unknown file source %d", source); return -1; } @@ -219,7 +219,7 @@ int git_attr_file__out_of_date( } default: - giterr_set(GITERR_INVALID, "invalid file type %d", file->source); + git_error_set(GIT_ERROR_INVALID, "invalid file type %d", file->source); return -1; } } @@ -245,7 +245,7 @@ int git_attr_file__parse_buffer( context = attrs->entry->path; if (git_mutex_lock(&attrs->lock) < 0) { - giterr_set(GITERR_OS, "failed to lock attribute file"); + git_error_set(GIT_ERROR_OS, "failed to lock attribute file"); return -1; } @@ -751,7 +751,7 @@ int git_attr_assignment__parse( /* allocate assign if needed */ if (!assign) { assign = git__calloc(1, sizeof(git_attr_assignment)); - GITERR_CHECK_ALLOC(assign); + GIT_ERROR_CHECK_ALLOC(assign); GIT_REFCOUNT_INC(assign); } @@ -785,7 +785,7 @@ int git_attr_assignment__parse( /* allocate permanent storage for name */ assign->name = git_pool_strndup(pool, name_start, scan - name_start); - GITERR_CHECK_ALLOC(assign->name); + GIT_ERROR_CHECK_ALLOC(assign->name); /* if there is an equals sign, find the value */ if (*scan == '=') { @@ -794,7 +794,7 @@ int git_attr_assignment__parse( /* if we found a value, allocate permanent storage for it */ if (scan > value_start) { assign->value = git_pool_strndup(pool, value_start, scan - value_start); - GITERR_CHECK_ALLOC(assign->value); + GIT_ERROR_CHECK_ALLOC(assign->value); } } |