Skip to content

Resolve inconsistency between curl_multi_perform and curl_multi_wait/poll documentation#20444

Closed
BillyONeal wants to merge 3 commits intocurl:masterfrom
BillyONeal:curl-multi-perform-docs
Closed

Resolve inconsistency between curl_multi_perform and curl_multi_wait/poll documentation#20444
BillyONeal wants to merge 3 commits intocurl:masterfrom
BillyONeal:curl-multi-perform-docs

Conversation

@BillyONeal
Copy link
Contributor

@BillyONeal BillyONeal commented Jan 27, 2026

The curl_multi_perform documentation (https://curl.se/libcurl/c/curl_multi_perform.html) uses integer contextual conversion to bool to test the resulting CURLMcode, while other functions like curl_multi_wait and curl_multi_poll test against CURLM_OK ( for example https://curl.se/libcurl/c/curl_multi_wait.html ). (I was initially confused by this as it looked like some docs call curl_multi_wait/poll on error, while some called only on success. I think it would be clearer to always test against CURLM_OK)

Also fixed the example to print which function call failed; previously an error reported by curl_multi_perform was printed as a failure of curl_multi_wait. It may be better to fix that by removing the function name entirely as https://curl.se/libcurl/c/curl_multi_wait.html seems to do instead...

…poll documentation

The `curl_multi_perform` documentation uses integer contextual conversion to `bool` to test the resulting `CURLMcode`, while other functions like `curl_multi_wait` and `curl_multi_poll` test against `CURLM_OK`. (I was initially confused by this as it looked like some docs call curl_multi_wait/poll on error, while some called only on success. But that was my misread, not a docs problem.)

Also fixed the example to print which function call failed; previously an error reported by `curl_multi_perform` was printed as a failure of `curl_multi_wait`.
```
docs/libcurl/curl_multi_perform.md:76:8: warning: for with space (SPACEBEFOREPAREN)
     for (;;) {
        ^
docs/libcurl/curl_multi_perform.md:79:82: warning: Longer than 79 columns (LONGLINE)
         fprintf(stderr, "curl_multi_perform() failed, code %d.\n", (int)mresult);
checksrc: 0 errors and 2 warnings
checksrc: 0 errors and 4 warnings suppressed
```
@BillyONeal BillyONeal marked this pull request as ready for review January 27, 2026 00:17
Co-authored-by: Viktor Szakats <vszakats@users.noreply.github.com>
@bagder bagder closed this in af508e3 Jan 27, 2026
@bagder
Copy link
Member

bagder commented Jan 27, 2026

Thanks!

@BillyONeal BillyONeal deleted the curl-multi-perform-docs branch January 29, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants