summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkas <kas-luthor@users.noreply.github.com>2019-12-13 15:11:38 +0100
committerkas <kas-luthor@users.noreply.github.com>2019-12-13 15:11:38 +0100
commitcb7fd1ede8651398b94a4db9407678423948101a (patch)
treefc8e1d2c4fb6dca320c8e7fc938f30a0ce298b55
parentfbdf5bdd9f530ed163667be108107864c16b00ea (diff)
downloadlibgit2-cb7fd1ede8651398b94a4db9407678423948101a.tar.gz
Fixes code styling
-rw-r--r--src/transports/ssh.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/transports/ssh.c b/src/transports/ssh.c
index 0c492ca54..46a197a0e 100644
--- a/src/transports/ssh.c
+++ b/src/transports/ssh.c
@@ -518,7 +518,6 @@ static int _git_ssh_setup_conn(
{
git_net_url urldata = GIT_NET_URL_INIT;
int auth_methods, error = 0;
- int sub_error;
size_t i;
ssh_stream *s;
git_cred *cred = NULL;
@@ -642,11 +641,10 @@ post_extract:
if (error == GIT_EAUTH) {
/* refresh auth methods */
- sub_error = list_auth_methods(&auth_methods, session, urldata.username);
- if (sub_error < 0) {
- error = sub_error;
+ if ((error = list_auth_methods(&auth_methods, session, urldata.username)) < 0)
goto done;
- }
+ else
+ error = GIT_EAUTH;
}
}