mirror of
https://github.com/curl/curl.git
synced 2026-08-26 11:03:33 +03:00
tidy-up: use more static, sizeof(), char[], double-const
- make `const` data `static`, where missing and possible. - replace `strlen()` on literal or const strings with `sizeof()`. While the latter is optimized by popular C compiler, e.g. MSVC only does it with `/O2`. - replace magic numbers with `sizeof()`, where missing. - introduce `CURL_CSTRLEN()` macro for `sizeof(char[]) - 1`. - use `CURL_CSTRLEN()` macro. - move `const` before integer types, where missing. - replace `char *var` with `var[]`, where missing and possible. - use double const, where missing. `static const char *` -> `static const char * const`. - lib1514: constify pointers. - unit3205: drop redundant cast, avoid another one. - unit1666: map `OID()` macro to identical `STRCONST()`. Closes #22406
This commit is contained in:
parent
573a6ec16b
commit
e1450d8fda
117 changed files with 311 additions and 287 deletions
|
|
@ -54,7 +54,7 @@ CURLcode Curl_input_digest(struct Curl_easy *data,
|
|||
if(!checkprefix("Digest", header) || !ISBLANK(header[6]))
|
||||
return CURLE_AUTH_ERROR;
|
||||
|
||||
header += strlen("Digest");
|
||||
header += CURL_CSTRLEN("Digest");
|
||||
curlx_str_passblanks(&header);
|
||||
|
||||
return Curl_auth_decode_digest_http_message(header, digest);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue