mirror of
https://github.com/curl/curl.git
synced 2026-08-25 12:03:39 +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
11
lib/smb.c
11
lib/smb.c
|
|
@ -6,7 +6,7 @@
|
|||
* \___|\___/|_| \_\_____|
|
||||
*
|
||||
* Copyright (C) 2014, Bill Nagel <wnagel@tycoint.com>, Exacq Technologies
|
||||
* Copyright (C) 2016-2018, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
* Copyright (C) 2016-2019, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
*
|
||||
* This software is licensed as described in the file COPYING, which
|
||||
* you should have received as part of this distribution. The terms
|
||||
|
|
@ -64,8 +64,7 @@ static CURLcode smb_request_state(struct connectdata *conn, bool *done);
|
|||
static CURLcode smb_done(struct connectdata *conn, CURLcode status,
|
||||
bool premature);
|
||||
static CURLcode smb_disconnect(struct connectdata *conn, bool dead);
|
||||
static int smb_getsock(struct connectdata *conn, curl_socket_t *socks,
|
||||
int numsocks);
|
||||
static int smb_getsock(struct connectdata *conn, curl_socket_t *socks);
|
||||
static CURLcode smb_parse_url_path(struct connectdata *conn);
|
||||
|
||||
/*
|
||||
|
|
@ -936,12 +935,8 @@ static CURLcode smb_disconnect(struct connectdata *conn, bool dead)
|
|||
return CURLE_OK;
|
||||
}
|
||||
|
||||
static int smb_getsock(struct connectdata *conn, curl_socket_t *socks,
|
||||
int numsocks)
|
||||
static int smb_getsock(struct connectdata *conn, curl_socket_t *socks)
|
||||
{
|
||||
if(!numsocks)
|
||||
return GETSOCK_BLANK;
|
||||
|
||||
socks[0] = conn->sock[FIRSTSOCKET];
|
||||
return GETSOCK_READSOCK(0) | GETSOCK_WRITESOCK(0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue