Unverified Commit 9a193102 by Patrick Steinhardt Committed by GitHub

Merge pull request #4774 from tiennou/fix/clang-analyzer

Coverity flavored clang analyzer fixes
parents fd7ab1d7 1c949ce1
......@@ -225,7 +225,7 @@ int git_mailmap_add_entry(
static int mailmap_add_buffer(git_mailmap *mm, const char *buf, size_t len)
{
int error;
int error = 0;
git_parse_ctx ctx;
/* Scratch buffers containing the real parsed names & emails */
......
......@@ -428,7 +428,7 @@ static int get_optional_config(
int git_remote_lookup(git_remote **out, git_repository *repo, const char *name)
{
git_remote *remote;
git_remote *remote = NULL;
git_buf buf = GIT_BUF_INIT;
const char *val;
int error = 0;
......@@ -510,7 +510,7 @@ int git_remote_lookup(git_remote **out, git_repository *repo, const char *name)
if ((error = get_optional_config(NULL, config, &buf, refspec_cb, &data)) < 0)
goto cleanup;
if (download_tags_value(remote, config) < 0)
if ((error = download_tags_value(remote, config)) < 0)
goto cleanup;
if ((error = lookup_remote_prune_config(remote, config, name)) < 0)
......
......@@ -550,7 +550,7 @@ cleanup:
static int prepare_walk(git_revwalk *walk)
{
int error;
int error = 0;
git_commit_list *list, *commits = NULL;
git_commit_list_node *next;
......
......@@ -142,7 +142,7 @@ static int auth_context_match(
}
if (!scheme)
return 0;
return -1;
/* See if authentication has already started for this scheme */
git_vector_foreach(&t->auth_contexts, i, c) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment