Skip to content

Commit

Permalink
rename ufds_resize to increase
Browse files Browse the repository at this point in the history
  • Loading branch information
icing committed Mar 22, 2024
1 parent 185e3e4 commit 929e97f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/multi.c
Expand Up @@ -1224,8 +1224,8 @@ static void reset_socket_fdwrite(curl_socket_t s)
}
#endif

static CURLMcode ufds_resize(struct pollfd **pfds, unsigned int *pfds_len,
unsigned int inc, bool *is_malloced)
static CURLMcode ufds_increase(struct pollfd **pfds, unsigned int *pfds_len,
unsigned int inc, bool *is_malloced)
{
struct pollfd *new_fds, *old_fds = *pfds;
unsigned int new_len = *pfds_len + inc;
Expand Down Expand Up @@ -1323,7 +1323,7 @@ static CURLMcode multi_wait(struct Curl_multi *multi,
}
else {
if(nfds >= ufds_len) {
if(ufds_resize(&ufds, &ufds_len, 100, &ufds_malloc))
if(ufds_increase(&ufds, &ufds_len, 100, &ufds_malloc))
return CURLM_OUT_OF_MEMORY;
}
DEBUGASSERT(nfds < ufds_len);
Expand Down Expand Up @@ -1365,7 +1365,7 @@ static CURLMcode multi_wait(struct Curl_multi *multi,
}
#endif
if(nfds >= ufds_len) {
if(ufds_resize(&ufds, &ufds_len, 100, &ufds_malloc))
if(ufds_increase(&ufds, &ufds_len, 100, &ufds_malloc))
return CURLM_OUT_OF_MEMORY;
}
DEBUGASSERT(nfds < ufds_len);
Expand All @@ -1384,7 +1384,7 @@ static CURLMcode multi_wait(struct Curl_multi *multi,
#ifndef USE_WINSOCK
if(use_wakeup && multi->wakeup_pair[0] != CURL_SOCKET_BAD) {
if(nfds >= ufds_len) {
if(ufds_resize(&ufds, &ufds_len, 100, &ufds_malloc))
if(ufds_increase(&ufds, &ufds_len, 100, &ufds_malloc))
return CURLM_OUT_OF_MEMORY;
}
DEBUGASSERT(nfds < ufds_len);
Expand Down

0 comments on commit 929e97f

Please sign in to comment.