Skip to content

Commit

Permalink
Merge pull request irssi#769 from horgh/horgh/error-check-server-connect
Browse files Browse the repository at this point in the history
Set host to an empty string on error

(cherry picked from commit 437fbef)
  • Loading branch information
ailin-nemui committed Oct 20, 2017
1 parent 2d0f7bc commit 11f0d04
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/core/network.c
Expand Up @@ -462,6 +462,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;
}

Expand Down

0 comments on commit 11f0d04

Please sign in to comment.