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/patch_parse.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/patch_parse.c')
-rw-r--r-- | src/patch_parse.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/patch_parse.c b/src/patch_parse.c index 0244dbb52..1bf3ad861 100644 --- a/src/patch_parse.c +++ b/src/patch_parse.c @@ -518,7 +518,7 @@ static int parse_hunk_header( return 0; fail: - giterr_set(GITERR_PATCH, "invalid patch hunk header at line %"PRIuZ, + git_error_set(GIT_ERROR_PATCH, "invalid patch hunk header at line %"PRIuZ, ctx->parse_ctx.line_num); return -1; } @@ -583,7 +583,7 @@ static int parse_hunk_body( } line = git_array_alloc(patch->base.lines); - GITERR_CHECK_ALLOC(line); + GIT_ERROR_CHECK_ALLOC(line); memset(line, 0x0, sizeof(git_diff_line)); @@ -650,7 +650,7 @@ static int parse_patch_header( * noise, continue. */ if (parse_hunk_header(&hunk, ctx) < 0) { - giterr_clear(); + git_error_clear(); continue; } @@ -673,7 +673,7 @@ static int parse_patch_header( continue; } - giterr_set(GITERR_PATCH, "no patch found"); + git_error_set(GIT_ERROR_PATCH, "no patch found"); error = GIT_ENOTFOUND; done: @@ -821,7 +821,7 @@ static int parse_patch_hunks( while (git_parse_ctx_contains_s(&ctx->parse_ctx, "@@ -")) { hunk = git_array_alloc(patch->base.hunks); - GITERR_CHECK_ALLOC(hunk); + GIT_ERROR_CHECK_ALLOC(hunk); memset(hunk, 0, sizeof(git_patch_hunk)); @@ -1079,7 +1079,7 @@ int git_patch_parse( *out = NULL; patch = git__calloc(1, sizeof(git_patch_parsed)); - GITERR_CHECK_ALLOC(patch); + GIT_ERROR_CHECK_ALLOC(patch); patch->ctx = ctx; GIT_REFCOUNT_INC(patch->ctx); @@ -1087,7 +1087,7 @@ int git_patch_parse( patch->base.free_fn = patch_parsed__free; patch->base.delta = git__calloc(1, sizeof(git_diff_delta)); - GITERR_CHECK_ALLOC(patch->base.delta); + GIT_ERROR_CHECK_ALLOC(patch->base.delta); patch->base.delta->status = GIT_DELTA_MODIFIED; patch->base.delta->nfiles = 2; @@ -1126,7 +1126,7 @@ int git_patch_from_buffer( int error; ctx = git_patch_parse_ctx_init(content, content_len, opts); - GITERR_CHECK_ALLOC(ctx); + GIT_ERROR_CHECK_ALLOC(ctx); error = git_patch_parse(out, ctx); |