docs: add FD_ZERO to curl_multi_fdset example

While the examples are not intended to complete applications this is
quite relevant for the correct function of the code.

Closes #16325
This commit is contained in:
Harry Sintonen 2025-02-13 20:33:33 +02:00 committed by Daniel Stenberg
parent 92af12a7e0
commit f138177b92
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -100,6 +100,10 @@ int main(void)
/* call curl_multi_perform() */
FD_ZERO(&fdread);
FD_ZERO(&fdwrite);
FD_ZERO(&fdexcep);
/* get file descriptors from the transfers */
mc = curl_multi_fdset(multi, &fdread, &fdwrite, &fdexcep, &maxfd);