mirror of
https://github.com/curl/curl.git
synced 2026-07-30 14:58:28 +03:00
lib/src: white space edits to comply better with code style
... as checksrc now finds and complains about these. Closes #14921
This commit is contained in:
parent
a57b45c386
commit
fbf5d507ce
128 changed files with 854 additions and 837 deletions
24
lib/urlapi.c
24
lib/urlapi.c
|
|
@ -181,7 +181,7 @@ static CURLUcode urlencode_str(struct dynbuf *o, const char *url,
|
|||
|
||||
if(urlchar_needs_escaping(*iptr)) {
|
||||
char out[3]={'%'};
|
||||
out[1] = hexdigits[*iptr>>4];
|
||||
out[1] = hexdigits[*iptr >> 4];
|
||||
out[2] = hexdigits[*iptr & 0xf];
|
||||
result = Curl_dyn_addn(o, out, 3);
|
||||
}
|
||||
|
|
@ -467,7 +467,7 @@ static CURLUcode parse_hostname_login(struct Curl_URL *u,
|
|||
ccode = Curl_parse_login_details(login, ptr - login - 1,
|
||||
&userp, &passwdp,
|
||||
(h && (h->flags & PROTOPT_URLOPTIONS)) ?
|
||||
&optionsp:NULL);
|
||||
&optionsp : NULL);
|
||||
if(ccode) {
|
||||
result = CURLUE_BAD_LOGIN;
|
||||
goto out;
|
||||
|
|
@ -1419,8 +1419,8 @@ CURLUcode curl_url_get(const CURLU *u, CURLUPart what,
|
|||
const char *ptr;
|
||||
CURLUcode ifmissing = CURLUE_UNKNOWN_PART;
|
||||
char portbuf[7];
|
||||
bool urldecode = (flags & CURLU_URLDECODE)?1:0;
|
||||
bool urlencode = (flags & CURLU_URLENCODE)?1:0;
|
||||
bool urldecode = (flags & CURLU_URLDECODE) ? 1 : 0;
|
||||
bool urlencode = (flags & CURLU_URLENCODE) ? 1 : 0;
|
||||
bool punycode = FALSE;
|
||||
bool depunyfy = FALSE;
|
||||
bool plusdecode = FALSE;
|
||||
|
|
@ -1454,8 +1454,8 @@ CURLUcode curl_url_get(const CURLU *u, CURLUPart what,
|
|||
case CURLUPART_HOST:
|
||||
ptr = u->host;
|
||||
ifmissing = CURLUE_NO_HOST;
|
||||
punycode = (flags & CURLU_PUNYCODE)?1:0;
|
||||
depunyfy = (flags & CURLU_PUNY2IDN)?1:0;
|
||||
punycode = (flags & CURLU_PUNYCODE) ? 1 : 0;
|
||||
depunyfy = (flags & CURLU_PUNY2IDN) ? 1 : 0;
|
||||
break;
|
||||
case CURLUPART_ZONEID:
|
||||
ptr = u->zoneid;
|
||||
|
|
@ -1514,8 +1514,8 @@ CURLUcode curl_url_get(const CURLU *u, CURLUPart what,
|
|||
bool show_query =
|
||||
(u->query && u->query[0]) ||
|
||||
(u->query_present && flags & CURLU_GET_EMPTY);
|
||||
punycode = (flags & CURLU_PUNYCODE)?1:0;
|
||||
depunyfy = (flags & CURLU_PUNY2IDN)?1:0;
|
||||
punycode = (flags & CURLU_PUNYCODE) ? 1 : 0;
|
||||
depunyfy = (flags & CURLU_PUNY2IDN) ? 1 : 0;
|
||||
if(u->scheme && strcasecompare("file", u->scheme)) {
|
||||
url = aprintf("file://%s%s%s",
|
||||
u->path,
|
||||
|
|
@ -1617,7 +1617,7 @@ CURLUcode curl_url_get(const CURLU *u, CURLUPart what,
|
|||
show_query ? "?": "",
|
||||
u->query ? u->query : "",
|
||||
show_fragment ? "#": "",
|
||||
u->fragment? u->fragment : "");
|
||||
u->fragment ? u->fragment : "");
|
||||
free(allochost);
|
||||
}
|
||||
if(!url)
|
||||
|
|
@ -1708,7 +1708,7 @@ CURLUcode curl_url_set(CURLU *u, CURLUPart what,
|
|||
const char *part, unsigned int flags)
|
||||
{
|
||||
char **storep = NULL;
|
||||
bool urlencode = (flags & CURLU_URLENCODE)? 1 : 0;
|
||||
bool urlencode = (flags & CURLU_URLENCODE) ? 1 : 0;
|
||||
bool plusencode = FALSE;
|
||||
bool urlskipslash = FALSE;
|
||||
bool leadingslash = FALSE;
|
||||
|
|
@ -1845,7 +1845,7 @@ CURLUcode curl_url_set(CURLU *u, CURLUPart what,
|
|||
break;
|
||||
case CURLUPART_QUERY:
|
||||
plusencode = urlencode;
|
||||
appendquery = (flags & CURLU_APPENDQUERY)?1:0;
|
||||
appendquery = (flags & CURLU_APPENDQUERY) ? 1 : 0;
|
||||
equalsencode = appendquery;
|
||||
storep = &u->query;
|
||||
u->query_present = TRUE;
|
||||
|
|
@ -1927,7 +1927,7 @@ CURLUcode curl_url_set(CURLU *u, CURLUPart what,
|
|||
}
|
||||
else {
|
||||
char out[3]={'%'};
|
||||
out[1] = hexdigits[*i>>4];
|
||||
out[1] = hexdigits[*i >> 4];
|
||||
out[2] = hexdigits[*i & 0xf];
|
||||
result = Curl_dyn_addn(&enc, out, 3);
|
||||
if(result)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue