libssh2: fix Value stored to 'sshp' is never read

Pointed out by scan-build

Closes #6900
This commit is contained in:
Daniel Stenberg 2021-04-15 17:46:24 +02:00
parent 0d7c55bd57
commit b532d35b5c
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 1 additions and 3 deletions

View File

@ -3054,17 +3054,15 @@ static CURLcode ssh_connect(struct Curl_easy *data, bool *done)
#ifdef CURL_LIBSSH2_DEBUG
curl_socket_t sock;
#endif
struct SSHPROTO *sshp = data->req.p.ssh;
struct ssh_conn *sshc;
CURLcode result;
struct connectdata *conn = data->conn;
/* initialize per-handle data if not already */
if(!sshp) {
if(!data->req.p.ssh) {
result = ssh_setup_connection(data, conn);
if(result)
return result;
sshp = data->req.p.ssh;
}
/* We default to persistent connections. We set this already in this connect