diff options
author | Marcel Raad <Marcel.Raad@teamviewer.com> | 2019-05-11 21:42:48 +0200 |
---|---|---|
committer | Marcel Raad <Marcel.Raad@teamviewer.com> | 2019-05-20 08:51:11 +0200 |
commit | 10db3ef21eef1c7a1727579952a81ced2f4afc8b (patch) | |
tree | 57129a847b5913959063a60290201b1f52482fee /lib/ssh.c | |
parent | 27af2ec219244bef24e6d11649d41aad3668da45 (diff) | |
download | curl-10db3ef21eef1c7a1727579952a81ced2f4afc8b.tar.gz |
lib: reduce variable scopes
Fixes Codacy/CppCheck warnings.
Closes https://github.com/curl/curl/pull/3872
Diffstat (limited to 'lib/ssh.c')
-rw-r--r-- | lib/ssh.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -587,13 +587,13 @@ static CURLcode ssh_check_fingerprint(struct connectdata *conn) struct Curl_easy *data = conn->data; const char *pubkey_md5 = data->set.str[STRING_SSH_HOST_PUBLIC_KEY_MD5]; char md5buffer[33]; - int i; const char *fingerprint = libssh2_hostkey_hash(sshc->ssh_session, LIBSSH2_HOSTKEY_HASH_MD5); if(fingerprint) { /* The fingerprint points to static storage (!), don't free() it. */ + int i; for(i = 0; i < 16; i++) msnprintf(&md5buffer[i*2], 3, "%02x", (unsigned char) fingerprint[i]); infof(data, "SSH MD5 fingerprint: %s\n", md5buffer); |