mirror of
https://github.com/irssi/irssi.git
synced 2026-08-21 01:22:26 +02: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:
parent
404eb0995e
commit
eef3183014
1 changed files with 1 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue