efl_net_ip_address: make coverity happy.

host and port were already checked, but let's quiet CID 1366921
This commit is contained in:
Gustavo Sverzut Barbieri 2016-12-12 13:02:55 -02:00
parent c4ab9882e1
commit 4f44287a59
1 changed files with 3 additions and 2 deletions

View File

@ -512,6 +512,7 @@ _efl_net_ip_address_resolve(Eo *cls EINA_UNUSED, void *pd EINA_UNUSED, const cha
Efl_Net_Ip_Address_Resolve_Context *ctx;
struct addrinfo hints = { };
const char *host = NULL, *port = NULL;
Eina_Bool r;
char *str;
EINA_SAFETY_ON_NULL_RETURN_VAL(address, NULL);
@ -526,8 +527,8 @@ _efl_net_ip_address_resolve(Eo *cls EINA_UNUSED, void *pd EINA_UNUSED, const cha
str = strdup(address);
EINA_SAFETY_ON_NULL_RETURN_VAL(str, NULL);
efl_net_ip_port_split(str, &host, &port);
if ((!host) || (host[0] == '\0'))
r = efl_net_ip_port_split(str, &host, &port);
if ((!r) || (!host) || (host[0] == '\0'))
{
host = address;
port = "0";