]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
docs: add FD_ZERO to curl_multi_fdset example
authorHarry Sintonen <sintonen@iki.fi>
Thu, 13 Feb 2025 18:33:33 +0000 (20:33 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 14 Feb 2025 07:21:42 +0000 (08:21 +0100)
While the examples are not intended to complete applications this is
quite relevant for the correct function of the code.

Closes #16325

docs/libcurl/curl_multi_fdset.md

index d43663dd90b56bb5b6719f6b6c91395b9bb59c32..1396738014c366d6e433ea9da4882c770a785be9 100644 (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);