]> granicus.if.org Git - curl/commitdiff
Fix problem: 'result' may be used uninitialized.
authorYang Tse <yangsita@gmail.com>
Sat, 31 May 2008 01:37:21 +0000 (01:37 +0000)
committerYang Tse <yangsita@gmail.com>
Sat, 31 May 2008 01:37:21 +0000 (01:37 +0000)
Issue detected by Guenter Knauf's NetWare autobuild.

lib/ssh.c

index 2e1633a009de75cb97d596ca6ca8598237bd82a9..f54353c037c26a28e350dbb3d1d30376ed91f3ce 100644 (file)
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -2175,7 +2175,7 @@ static CURLcode ssh_do(struct connectdata *conn, bool *done)
    disconnecting operations that takes a while */
 static CURLcode scp_disconnect(struct connectdata *conn)
 {
-  CURLcode result;
+  CURLcode result = CURLE_OK;
 
   Curl_safefree(conn->data->state.proto.ssh);
   conn->data->state.proto.ssh = NULL;
@@ -2331,7 +2331,7 @@ static CURLcode sftp_doing(struct connectdata *conn,
    disconnecting operations that takes a while */
 static CURLcode sftp_disconnect(struct connectdata *conn)
 {
-  CURLcode result;
+  CURLcode result = CURLE_OK;
 
   DEBUGF(infof(conn->data, "SSH DISCONNECT starts now\n"));