lib: reduce variable scopes

Fixes Codacy/CppCheck warnings.

Closes https://github.com/curl/curl/pull/3872
This commit is contained in:
Marcel Raad 2019-05-11 21:42:48 +02:00
parent 27af2ec219
commit 10db3ef21e
No known key found for this signature in database
GPG key ID: FE4D8BC5EE1701DD
23 changed files with 115 additions and 124 deletions

View file

@ -605,9 +605,9 @@ static CURLUcode hostname_check(struct Curl_URL *u, char *hostname)
/* only valid letters are ok */
len = strspn(hostname, l);
if(hlen != len) {
/* this could now be '%[zone id]' */
char zoneid[16];
if(hostname[len] == '%') {
/* this could now be '%[zone id]' */
char zoneid[16];
int i = 0;
char *h = &hostname[len + 1];
/* pass '25' if present and is a url encoded percent sign */