]> git.ipfire.org Git - thirdparty/curl.git/commit
lib: refactor the type of funcs which have useless return and checks
authorx2018 <xkernel.wang@foxmail.com>
Thu, 6 Nov 2025 17:59:00 +0000 (01:59 +0800)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 7 Nov 2025 12:01:39 +0000 (13:01 +0100)
commit608d96694b392a96e448de266a41fc65607150b9
tree1e2ccba69837f12ff3d1498eaff8d9dd7099ab52
parent2684af257e7fc4369e4ac1d45b4e303859259677
lib: refactor the type of funcs which have useless return and checks

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 directly changes their type to void and cleaned the remaining
checks for their return value.

Closes #19386
13 files changed:
lib/cf-h2-proxy.c
lib/ftplistparser.c
lib/ftplistparser.h
lib/getinfo.c
lib/getinfo.h
lib/http_proxy.c
lib/http_proxy.h
lib/progress.c
lib/progress.h
lib/sendf.c
lib/telnet.c
lib/transfer.c
lib/vauth/digest.c