]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
libssh2: fix Value stored to 'sshp' is never read
authorDaniel Stenberg <daniel@haxx.se>
Thu, 15 Apr 2021 15:46:24 +0000 (17:46 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 15 Apr 2021 20:43:35 +0000 (22:43 +0200)
Pointed out by scan-build

Closes #6900

lib/vssh/libssh2.c

index 9d188d05824083a59f1929231598741caf692037..2d431ce347ee7a8b96c2bb7afb02c40f91f2fbb6 100644 (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