mirror of
https://github.com/moparisthebest/curl
synced 2025-02-28 17:31:46 -05:00
hostip: fix 'potentially uninitialized variable' warning
Follow-up to 50d1b33. Caught by AppVeyor.
This commit is contained in:
parent
9b4c2165f1
commit
73050fb6ae
@ -823,7 +823,7 @@ CURLcode Curl_loadhostpairs(struct Curl_easy *data)
|
|||||||
char *entry_id;
|
char *entry_id;
|
||||||
size_t entry_len;
|
size_t entry_len;
|
||||||
char address[64];
|
char address[64];
|
||||||
char *addresses;
|
char *addresses = NULL;
|
||||||
char *addr_begin;
|
char *addr_begin;
|
||||||
char *addr_end;
|
char *addr_end;
|
||||||
char *port_ptr;
|
char *port_ptr;
|
||||||
@ -842,7 +842,7 @@ CURLcode Curl_loadhostpairs(struct Curl_easy *data)
|
|||||||
|
|
||||||
port_ptr = host_end + 1;
|
port_ptr = host_end + 1;
|
||||||
tmp_port = strtoul(port_ptr, &end_ptr, 10);
|
tmp_port = strtoul(port_ptr, &end_ptr, 10);
|
||||||
if(end_ptr == port_ptr || tmp_port > USHRT_MAX || *end_ptr != ':')
|
if(tmp_port > USHRT_MAX || end_ptr == port_ptr || *end_ptr != ':')
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
port = (int)tmp_port;
|
port = (int)tmp_port;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user