]> granicus.if.org Git - curl/commitdiff
Julien Chaffraix pointed out a comment mistake, and I re-indented the code
authorDaniel Stenberg <daniel@haxx.se>
Tue, 2 Feb 2010 08:48:58 +0000 (08:48 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 2 Feb 2010 08:48:58 +0000 (08:48 +0000)
slightly while editing

lib/ftp.c

index 855c0deb5855acbb04e4e063ab330102f213f047..d34663013706882ccba14414c010789cb94c6396 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -879,9 +879,8 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
       error = SOCKERRNO;
       if(error == EADDRNOTAVAIL) {
 
-        /* The requested bind address is not local
-         * use the address used forthe control connection instead
-         * restart the port loop
+        /* The requested bind address is not local.  Use the address used for
+         * the control connection instead and restart the port loop
          */
         failf(data, "bind(port=%i) failed: %s", port,
               Curl_strerror(conn, error) );
@@ -895,14 +894,13 @@ static CURLcode ftp_state_use_port(struct connectdata *conn,
         }
         port = port_min;
         continue;
-      }else
-      if(error != EADDRINUSE && error != EACCES) {
+      }
+      else if(error != EADDRINUSE && error != EACCES) {
         failf(data, "bind(port=%i) failed: %s", port,
               Curl_strerror(conn, error) );
         sclose(portsock);
         return CURLE_FTP_PORT_FAILED;
       }
-
     }
     else
       break;