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
This commit is contained in:
Daniel Stenberg 2019-07-30 11:02:03 +02:00
parent cb542ac4d0
commit a55faf33d4
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
27 changed files with 88 additions and 201 deletions

View file

@ -100,16 +100,11 @@ void Curl_http2_init_userset(struct UserDefined *set)
}
static int http2_perform_getsock(const struct connectdata *conn,
curl_socket_t *sock, /* points to
numsocks
number of
sockets */
int numsocks)
curl_socket_t *sock)
{
const struct http_conn *c = &conn->proto.httpc;
struct SingleRequest *k = &conn->data->req;
int bitmap = GETSOCK_BLANK;
(void)numsocks;
sock[0] = conn->sock[FIRSTSOCKET];
@ -126,11 +121,9 @@ static int http2_perform_getsock(const struct connectdata *conn,
}
static int http2_getsock(struct connectdata *conn,
curl_socket_t *sock, /* points to numsocks
number of sockets */
int numsocks)
curl_socket_t *socks)
{
return http2_perform_getsock(conn, sock, numsocks);
return http2_perform_getsock(conn, socks);
}
/*