diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2019-01-10 22:39:56 +0000 |
|---|---|---|
| committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-01-22 22:30:37 +0000 |
| commit | fcc7dcb1762bbc01ef0088b4cc866ca712622e3a (patch) | |
| tree | 8da31905b787a336433e8c262d54db7b7f391403 /examples/network | |
| parent | 115a6c50c9c67bdf952304a3ed6a24673b42b815 (diff) | |
| download | libgit2-fcc7dcb1762bbc01ef0088b4cc866ca712622e3a.tar.gz | |
errors: remove giterr usage in examples
Diffstat (limited to 'examples/network')
| -rw-r--r-- | examples/network/clone.c | 2 | ||||
| -rw-r--r-- | examples/network/git2.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/network/clone.c b/examples/network/clone.c index ce4b6aedf..bbcd2e848 100644 --- a/examples/network/clone.c +++ b/examples/network/clone.c @@ -104,7 +104,7 @@ int do_clone(git_repository *repo, int argc, char **argv) error = git_clone(&cloned_repo, url, path, &clone_opts); printf("\n"); if (error != 0) { - const git_error *err = giterr_last(); + const git_error *err = git_error_last(); if (err) printf("ERROR %d: %s\n", err->klass, err->message); else printf("ERROR %d: no detailed info\n", error); } diff --git a/examples/network/git2.c b/examples/network/git2.c index 1d3d27b1b..d0d0eb610 100644 --- a/examples/network/git2.c +++ b/examples/network/git2.c @@ -26,10 +26,10 @@ static int run_command(git_cb fn, git_repository *repo, struct args_info args) /* Run the command. If something goes wrong, print the error message to stderr */ error = fn(repo, args.argc - args.pos, &args.argv[args.pos]); if (error < 0) { - if (giterr_last() == NULL) + if (git_error_last() == NULL) fprintf(stderr, "Error without message"); else - fprintf(stderr, "Bad news:\n %s\n", giterr_last()->message); + fprintf(stderr, "Bad news:\n %s\n", git_error_last()->message); } return !!error; |
