aboutsummaryrefslogtreecommitdiff
path: root/lib/ssh-libssh.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-07-30 11:02:03 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-07-30 23:16:44 +0200
commita55faf33d4b868c8e8173e7aabfe1e286a1a7658 (patch)
tree415811788599dee37eed1e52b7c7595e794e3315 /lib/ssh-libssh.c
parentcb542ac4d085e9446a9dfc6632fad9a851b507fe (diff)
cleanup: remove the 'numsocks' argument used in many places
It was used (intended) to pass in the size of the 'socks' array that is also passed to these functions, but was rarely actually checked/used and the array is defined to a fixed size of MAX_SOCKSPEREASYHANDLE entries that should be used instead. Closes #4169
Diffstat (limited to 'lib/ssh-libssh.c')
-rw-r--r--lib/ssh-libssh.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/lib/ssh-libssh.c b/lib/ssh-libssh.c
index 879358eba..4b34b0212 100644
--- a/lib/ssh-libssh.c
+++ b/lib/ssh-libssh.c
@@ -126,13 +126,9 @@ CURLcode sftp_perform(struct connectdata *conn,
static void sftp_quote(struct connectdata *conn);
static void sftp_quote_stat(struct connectdata *conn);
-
-static int myssh_getsock(struct connectdata *conn, curl_socket_t *sock,
- int numsocks);
-
+static int myssh_getsock(struct connectdata *conn, curl_socket_t *sock);
static int myssh_perform_getsock(const struct connectdata *conn,
- curl_socket_t *sock,
- int numsocks);
+ curl_socket_t *sock);
static CURLcode myssh_setup_connection(struct connectdata *conn);
@@ -1913,13 +1909,9 @@ static CURLcode myssh_statemach_act(struct connectdata *conn, bool *block)
/* called by the multi interface to figure out what socket(s) to wait for and
for what actions in the DO_DONE, PERFORM and WAITPERFORM states */
static int myssh_perform_getsock(const struct connectdata *conn,
- curl_socket_t *sock, /* points to numsocks
- number of sockets */
- int numsocks)
+ curl_socket_t *sock)
{
int bitmap = GETSOCK_BLANK;
- (void) numsocks;
-
sock[0] = conn->sock[FIRSTSOCKET];
if(conn->waitfor & KEEP_RECV)
@@ -1934,13 +1926,11 @@ static int myssh_perform_getsock(const struct connectdata *conn,
/* Generic function called by the multi interface to figure out what socket(s)
to wait for and for what actions during the DOING and PROTOCONNECT states*/
static int myssh_getsock(struct connectdata *conn,
- curl_socket_t *sock, /* points to numsocks
- number of sockets */
- int numsocks)
+ curl_socket_t *sock)
{
/* if we know the direction we can use the generic *_getsock() function even
for the protocol_connect and doing states */
- return myssh_perform_getsock(conn, sock, numsocks);
+ return myssh_perform_getsock(conn, sock);
}
static void myssh_block2waitfor(struct connectdata *conn, bool block)