mirror of
https://github.com/curl/curl.git
synced 2026-08-10 07:10:51 +03:00
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:
parent
cb542ac4d0
commit
a55faf33d4
27 changed files with 88 additions and 201 deletions
13
lib/http2.c
13
lib/http2.c
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue