Skip to content

lib: refactor the type of funcs which have useless return and checks - #19386

Closed
x2018 wants to merge 2 commits into
curl:masterfrom
x2018:meanless_ret_cleanup
Closed

lib: refactor the type of funcs which have useless return and checks#19386
x2018 wants to merge 2 commits into
curl:masterfrom
x2018:meanless_ret_cleanup

Conversation

@x2018

@x2018 x2018 commented Nov 6, 2025

Copy link
Copy Markdown
Contributor

Some internal functions always return CURLE_OK.
Curl_http_proxy_get_destination() does that from bb4032a, (2 years ago) And the original inline code does not need to check the status.
Curl_wildcard_init() does that from e60fe20. (8 years ago)
Curl_initinfo() does that from a very beginning.
Curl_pgrsSetDownloadCounter() did not have a return before 914e49b, ad051e1 recovered its content (2 years ago) but did not completely recovered the changes related to it.
auth_digest_get_qop_values() does that from 676de7f.

This PR directly changes their type to void and cleaned the remaining checks for their return value.

@x2018
x2018 marked this pull request as draft November 6, 2025 18:54
@x2018
x2018 marked this pull request as ready for review November 6, 2025 19:05
@vszakats
vszakats force-pushed the meanless_ret_cleanup branch from 7f5ca7f to 9ad1b95 Compare November 7, 2025 10:39
@bagder bagder closed this in 608d966 Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants