1
0
mirror of https://github.com/irssi/irssi.git synced 2024-10-13 05:03:45 -04:00

Merge pull request #769 from horgh/horgh/error-check-server-connect

Set host to an empty string on error
This commit is contained in:
ailin-nemui 2017-10-13 17:14:47 +02:00 committed by GitHub
commit 7b97edf9d1

View File

@ -489,6 +489,7 @@ int net_gethostbyaddr(IPADDR *ip, char **name)
int net_ip2host(IPADDR *ip, char *host)
{
host[0] = '\0';
return inet_ntop(ip->family, &ip->ip, host, MAX_IP_LEN) ? 0 : -1;
}