clang-tidy: sync argument names in prototype and definition

Discovered with clang-tidy checker
`readability-inconsistent-declaration-parameter-name`.

Also:
- do not enforce the above because of inconsistencies still present
  between public API prototypes and definitions. (Also betwen man page
  protos, and man page examples, and other parts of the code, e.g.
  `easy` vs `curl` vs `d` vs `handle`) Perhaps subject for a future
  effort:
  https://github.com/curl/curl/actions/runs/22166472728/job/64094691653
- enable and fix `readability-named-parameter` where missing.

Refs:
https://clang.llvm.org/extra/clang-tidy/checks/readability/inconsistent-declaration-parameter-name.html
https://clang.llvm.org/extra/clang-tidy/checks/readability/named-parameter.html

Closes #20624
This commit is contained in:
Viktor Szakats 2026-02-18 00:55:27 +01:00
parent 7c01bb23bc
commit c878160e9c
No known key found for this signature in database
64 changed files with 200 additions and 195 deletions

View file

@ -99,11 +99,11 @@ fail:
}
int Curl_HMAC_update(struct HMAC_context *ctxt,
const unsigned char *ptr,
const unsigned char *data,
unsigned int len)
{
/* Update first hash calculation. */
ctxt->hash->hupdate(ctxt->hashctxt1, ptr, len);
ctxt->hash->hupdate(ctxt->hashctxt1, data, len);
return 0;
}
@ -143,7 +143,7 @@ int Curl_HMAC_final(struct HMAC_context *ctxt, unsigned char *output)
*/
CURLcode Curl_hmacit(const struct HMAC_params *hashparams,
const unsigned char *key, const size_t keylen,
const unsigned char *buf, const size_t buflen,
const unsigned char *data, const size_t datalen,
unsigned char *output)
{
struct HMAC_context *ctxt =
@ -153,7 +153,7 @@ CURLcode Curl_hmacit(const struct HMAC_params *hashparams,
return CURLE_OUT_OF_MEMORY;
/* Update the digest with the given challenge */
Curl_HMAC_update(ctxt, buf, curlx_uztoui(buflen));
Curl_HMAC_update(ctxt, data, curlx_uztoui(datalen));
/* Finalise the digest */
Curl_HMAC_final(ctxt, output);