mirror of
https://github.com/curl/curl.git
synced 2026-08-25 20:53:37 +03:00
build: use more const
Mostly with `char *` types. Also: - mime, x509asn1, tool_operate, lib3207: drop redundant casts. - examples/smooth-gtk-thread: add missing variable declaration. - reduce variable scopes. - tests/server: move `data_to_hex()` to its only user: `sws`. Closes #20489
This commit is contained in:
parent
66bb641331
commit
9630593650
111 changed files with 278 additions and 268 deletions
|
|
@ -86,7 +86,7 @@ static int urlpart(struct per_transfer *per, writeoutid vid,
|
|||
if(uh) {
|
||||
CURLUPart cpart = CURLUPART_HOST;
|
||||
char *part = NULL;
|
||||
const char *url = NULL;
|
||||
char *url = NULL;
|
||||
|
||||
if(vid >= VAR_INPUT_URLESCHEME) {
|
||||
if(curl_easy_getinfo(per->curl, CURLINFO_EFFECTIVE_URL, &url))
|
||||
|
|
@ -162,7 +162,7 @@ static int urlpart(struct per_transfer *per, writeoutid vid,
|
|||
static void certinfo(struct per_transfer *per)
|
||||
{
|
||||
if(!per->certinfo) {
|
||||
struct curl_certinfo *certinfo;
|
||||
const struct curl_certinfo *certinfo;
|
||||
CURLcode result = curl_easy_getinfo(per->curl, CURLINFO_CERTINFO,
|
||||
&certinfo);
|
||||
per->certinfo = (!result && certinfo) ? certinfo : NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue