forked from PsychoticNinja/irssi
Merge pull request #769 from horgh/horgh/error-check-server-connect
Set host to an empty string on error (cherry picked from commit 437fbef6eb8f605320841cba119d3abbb3571a75)
This commit is contained in:
parent
2d0f7bcc50
commit
11f0d046de
@ -462,6 +462,7 @@ int net_gethostbyaddr(IPADDR *ip, char **name)
|
|||||||
|
|
||||||
int net_ip2host(IPADDR *ip, char *host)
|
int net_ip2host(IPADDR *ip, char *host)
|
||||||
{
|
{
|
||||||
|
host[0] = '\0';
|
||||||
return inet_ntop(ip->family, &ip->ip, host, MAX_IP_LEN) ? 0 : -1;
|
return inet_ntop(ip->family, &ip->ip, host, MAX_IP_LEN) ? 0 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user