summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2016-01-27 15:04:07 +0100
committerLemonBoy <thatlemon@gmail.com>2016-01-27 15:04:07 +0100
commitf31b2026b4732e57f88af14796ac0dea4b2d0131 (patch)
treefd45364e79bbf4f2838422625df49d1bd04dcc70
parent70c7949cfe2f07545e5eeb4291631916ab28d07f (diff)
downloadirssi-f31b2026b4732e57f88af14796ac0dea4b2d0131.zip
Minor style fix in net_ip2host.
-rw-r--r--src/core/network.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/core/network.c b/src/core/network.c
index 4d3997a1..28189661 100644
--- a/src/core/network.c
+++ b/src/core/network.c
@@ -459,10 +459,7 @@ int net_gethostbyaddr(IPADDR *ip, char **name)
int net_ip2host(IPADDR *ip, char *host)
{
- if (!inet_ntop(ip->family, &ip->ip, host, MAX_IP_LEN))
- return -1;
-
- return 0;
+ return inet_ntop(ip->family, &ip->ip, host, MAX_IP_LEN) ? 0 : -1;
}
int net_host2ip(const char *host, IPADDR *ip)