mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:31:41 +03:00
curl_multi_waitfds.md: tidy up the example
- remove typecast - shorten comment Closes #16050
This commit is contained in:
parent
8368249907
commit
9ce0bed1ff
1 changed files with 2 additions and 5 deletions
|
|
@ -83,11 +83,8 @@ int main(void)
|
|||
if(!fd_count)
|
||||
continue; /* no descriptors yet */
|
||||
|
||||
/* Allocate storage for our descriptors.
|
||||
* Note that a better approach can be used to minimize allocations and
|
||||
* deallocations, if needed, like pre-allocated or grow-only array.
|
||||
*/
|
||||
ufds = (struct curl_waitfd*)malloc(fd_count * sizeof(struct curl_waitfd));
|
||||
/* allocate storage for our descriptors */
|
||||
ufds = malloc(fd_count * sizeof(struct curl_waitfd));
|
||||
|
||||
/* get wait descriptors from the transfers and put them into array. */
|
||||
mc = curl_multi_waitfds(multi, ufds, fd_count, &fd_count);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue