diff options
author | Marcel Raad <Marcel.Raad@teamviewer.com> | 2019-05-11 21:42:48 +0200 |
---|---|---|
committer | Marcel Raad <Marcel.Raad@teamviewer.com> | 2019-05-20 08:51:11 +0200 |
commit | 10db3ef21eef1c7a1727579952a81ced2f4afc8b (patch) | |
tree | 57129a847b5913959063a60290201b1f52482fee /lib/urlapi.c | |
parent | 27af2ec219244bef24e6d11649d41aad3668da45 (diff) |
lib: reduce variable scopes
Fixes Codacy/CppCheck warnings.
Closes https://github.com/curl/curl/pull/3872
Diffstat (limited to 'lib/urlapi.c')
-rw-r--r-- | lib/urlapi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/urlapi.c b/lib/urlapi.c index 0d05f4d92..3fef2fcf7 100644 --- a/lib/urlapi.c +++ b/lib/urlapi.c @@ -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 */ |