From f31b2026b4732e57f88af14796ac0dea4b2d0131 Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Wed, 27 Jan 2016 15:04:07 +0100 Subject: [PATCH] Minor style fix in net_ip2host. --- src/core/network.c | 5 +---- 1 file changed, 1 insertion(+), 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)