mirror of
https://github.com/curl/curl.git
synced 2026-08-26 06:03:32 +03:00
tidy-up: miscellaneous
- curl_ntlm_core, smtp, schannel: fix comments.
- curl_setup.h: fix to undef before define.
- tool_doswin, server/sockfilt: reduce variables scopes.
- tool_doswin: drop an interim variable.
- windows: replace `SOCKET_ERROR` with `0` to align with rest of code.
- libssh2: rename variable to align with rest of code.
- gtls, unit1398: use `#if 0`.
- curl_trc.h, curlx/inet_ntop.h: add missing parentheses in macro
expressions.
- ldap.c: set empty macro to `do {} while(0)`.
- examples/crawler: rename a non-CURLcode `result` variable.
- CURLINFO_TLS_SESSION: drop stray colon.
- add `const` to casts where missing.
- drop unnecessary parentheses.
- fix indent.
- quote style.
- comment style.
- whitespace, newlines, fold/unfold.
Closes #20554
This commit is contained in:
parent
2a92c39a21
commit
61df5f466c
88 changed files with 503 additions and 503 deletions
18
lib/urlapi.c
18
lib/urlapi.c
|
|
@ -118,8 +118,8 @@ static const char *find_host_sep(const char *url)
|
|||
}
|
||||
|
||||
/* convert CURLcode to CURLUcode */
|
||||
#define cc2cu(x) ((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : \
|
||||
CURLUE_OUT_OF_MEMORY)
|
||||
#define cc2cu(x) \
|
||||
((x) == CURLE_TOO_LARGE ? CURLUE_TOO_LARGE : CURLUE_OUT_OF_MEMORY)
|
||||
|
||||
/* urlencode_str() writes data into an output dynbuf and URL-encodes the
|
||||
* spaces in the source URL accordingly.
|
||||
|
|
@ -1440,9 +1440,9 @@ static CURLUcode urlget_url(const CURLU *u, char **part, unsigned int flags)
|
|||
if(u->scheme && curl_strequal("file", u->scheme)) {
|
||||
url = curl_maprintf("file://%s%s%s%s%s",
|
||||
u->path,
|
||||
show_query ? "?": "",
|
||||
show_query ? "?" : "",
|
||||
u->query ? u->query : "",
|
||||
show_fragment ? "#": "",
|
||||
show_fragment ? "#" : "",
|
||||
u->fragment ? u->fragment : "");
|
||||
}
|
||||
else if(!u->host)
|
||||
|
|
@ -1517,18 +1517,18 @@ static CURLUcode urlget_url(const CURLU *u, char **part, unsigned int flags)
|
|||
url = curl_maprintf("%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s",
|
||||
schemebuf,
|
||||
u->user ? u->user : "",
|
||||
u->password ? ":": "",
|
||||
u->password ? ":" : "",
|
||||
u->password ? u->password : "",
|
||||
options ? ";" : "",
|
||||
options ? options : "",
|
||||
(u->user || u->password || options) ? "@": "",
|
||||
(u->user || u->password || options) ? "@" : "",
|
||||
allochost ? allochost : u->host,
|
||||
port ? ":": "",
|
||||
port ? ":" : "",
|
||||
port ? port : "",
|
||||
u->path ? u->path : "/",
|
||||
show_query ? "?": "",
|
||||
show_query ? "?" : "",
|
||||
u->query ? u->query : "",
|
||||
show_fragment ? "#": "",
|
||||
show_fragment ? "#" : "",
|
||||
u->fragment ? u->fragment : "");
|
||||
curlx_free(allochost);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue