summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorailin-nemui <ailin-nemui@users.noreply.github.com>2017-10-13 17:14:47 +0200
committerGitHub <noreply@github.com>2017-10-13 17:14:47 +0200
commit7b97edf9d1de8c270e4482c85d142303e07525c9 (patch)
treeeef2cbd20cc6930333202ab060ceaabb51687291 /src/core
parentb2865d6bcc5a18841cf1aaf9b05b56e9717026c0 (diff)
parent174adee9dd91c23615f79b979b3b3c5f72ad1240 (diff)
downloadirssi-7b97edf9d1de8c270e4482c85d142303e07525c9.zip
Merge pull request #769 from horgh/horgh/error-check-server-connect
Set host to an empty string on error
Diffstat (limited to 'src/core')
-rw-r--r--src/core/network.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/network.c b/src/core/network.c
index 4494dbc6..b38c9102 100644
--- a/src/core/network.c
+++ b/src/core/network.c
@@ -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;
}